typespeed 2.3.6 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/app/src/config-development.json +3 -2
  2. package/app/src/test-socket.class.ts +56 -0
  3. package/app/src/views/socket.html +23 -0
  4. package/dist/introduction/decorator/example-import.class.js +17 -0
  5. package/dist/introduction/decorator/main-app.js +14 -0
  6. package/dist/introduction/decorator/main-decorator.js +127 -0
  7. package/dist/introduction/decorator/main-import.js +1 -0
  8. package/dist/introduction/decorator/main-reflect.js +38 -0
  9. package/dist/introduction/web-services/db-init.js +33 -0
  10. package/dist/introduction/web-services/db-singleton.js +49 -0
  11. package/dist/introduction/web-services/http-if.js +12 -0
  12. package/dist/introduction/web-services/http-init.js +7 -0
  13. package/dist/introduction/web-services/http-router.js +23 -0
  14. package/dist/{database.decorator.js → src/database.decorator.js} +2 -4
  15. package/dist/{default → src/default}/express-server.class.js +20 -5
  16. package/dist/{default → src/default}/rabbitmq.class.js +3 -3
  17. package/dist/{default → src/default}/redis.class.js +1 -1
  18. package/dist/src/default/socket-io.class.js +64 -0
  19. package/dist/{typespeed.js → src/typespeed.js} +6 -3
  20. package/dist/typespeed.d.ts +19 -1
  21. package/package.json +8 -8
  22. package/src/database.decorator.ts +2 -4
  23. package/src/default/express-server.class.ts +18 -7
  24. package/src/default/rabbitmq.class.ts +3 -3
  25. package/src/default/redis.class.ts +1 -1
  26. package/src/default/socket-io.class.ts +68 -0
  27. package/src/factory/server-factory.class.ts +1 -1
  28. package/src/typespeed.d.ts +19 -1
  29. package/src/typespeed.ts +7 -4
  30. package/test/socket.test.ts +60 -0
  31. package/tsconfig.json +2 -1
  32. package/app/node_modules/.package-lock.json +0 -134
  33. package/app/node_modules/@types/body-parser/LICENSE +0 -21
  34. package/app/node_modules/@types/body-parser/README.md +0 -16
  35. package/app/node_modules/@types/body-parser/index.d.ts +0 -107
  36. package/app/node_modules/@types/body-parser/package.json +0 -58
  37. package/app/node_modules/@types/connect/LICENSE +0 -21
  38. package/app/node_modules/@types/connect/README.md +0 -16
  39. package/app/node_modules/@types/connect/index.d.ts +0 -93
  40. package/app/node_modules/@types/connect/package.json +0 -32
  41. package/app/node_modules/@types/express/LICENSE +0 -21
  42. package/app/node_modules/@types/express/README.md +0 -16
  43. package/app/node_modules/@types/express/index.d.ts +0 -136
  44. package/app/node_modules/@types/express/package.json +0 -45
  45. package/app/node_modules/@types/express-serve-static-core/LICENSE +0 -21
  46. package/app/node_modules/@types/express-serve-static-core/README.md +0 -16
  47. package/app/node_modules/@types/express-serve-static-core/index.d.ts +0 -1281
  48. package/app/node_modules/@types/express-serve-static-core/package.json +0 -55
  49. package/app/node_modules/@types/mime/LICENSE +0 -21
  50. package/app/node_modules/@types/mime/Mime.d.ts +0 -10
  51. package/app/node_modules/@types/mime/README.md +0 -16
  52. package/app/node_modules/@types/mime/index.d.ts +0 -35
  53. package/app/node_modules/@types/mime/lite.d.ts +0 -7
  54. package/app/node_modules/@types/mime/package.json +0 -29
  55. package/app/node_modules/@types/node/LICENSE +0 -21
  56. package/app/node_modules/@types/node/README.md +0 -16
  57. package/app/node_modules/@types/node/assert/strict.d.ts +0 -8
  58. package/app/node_modules/@types/node/assert.d.ts +0 -961
  59. package/app/node_modules/@types/node/async_hooks.d.ts +0 -518
  60. package/app/node_modules/@types/node/buffer.d.ts +0 -2323
  61. package/app/node_modules/@types/node/child_process.d.ts +0 -1399
  62. package/app/node_modules/@types/node/cluster.d.ts +0 -410
  63. package/app/node_modules/@types/node/console.d.ts +0 -412
  64. package/app/node_modules/@types/node/constants.d.ts +0 -18
  65. package/app/node_modules/@types/node/crypto.d.ts +0 -3973
  66. package/app/node_modules/@types/node/dgram.d.ts +0 -545
  67. package/app/node_modules/@types/node/diagnostics_channel.d.ts +0 -192
  68. package/app/node_modules/@types/node/dns/promises.d.ts +0 -370
  69. package/app/node_modules/@types/node/dns.d.ts +0 -660
  70. package/app/node_modules/@types/node/dom-events.d.ts +0 -126
  71. package/app/node_modules/@types/node/domain.d.ts +0 -170
  72. package/app/node_modules/@types/node/events.d.ts +0 -682
  73. package/app/node_modules/@types/node/fs/promises.d.ts +0 -1159
  74. package/app/node_modules/@types/node/fs.d.ts +0 -3976
  75. package/app/node_modules/@types/node/globals.d.ts +0 -303
  76. package/app/node_modules/@types/node/globals.global.d.ts +0 -1
  77. package/app/node_modules/@types/node/http.d.ts +0 -1714
  78. package/app/node_modules/@types/node/http2.d.ts +0 -2133
  79. package/app/node_modules/@types/node/https.d.ts +0 -542
  80. package/app/node_modules/@types/node/index.d.ts +0 -134
  81. package/app/node_modules/@types/node/inspector.d.ts +0 -2741
  82. package/app/node_modules/@types/node/module.d.ts +0 -115
  83. package/app/node_modules/@types/node/net.d.ts +0 -883
  84. package/app/node_modules/@types/node/os.d.ts +0 -473
  85. package/app/node_modules/@types/node/package.json +0 -237
  86. package/app/node_modules/@types/node/path.d.ts +0 -191
  87. package/app/node_modules/@types/node/perf_hooks.d.ts +0 -625
  88. package/app/node_modules/@types/node/process.d.ts +0 -1488
  89. package/app/node_modules/@types/node/punycode.d.ts +0 -117
  90. package/app/node_modules/@types/node/querystring.d.ts +0 -131
  91. package/app/node_modules/@types/node/readline/promises.d.ts +0 -143
  92. package/app/node_modules/@types/node/readline.d.ts +0 -653
  93. package/app/node_modules/@types/node/repl.d.ts +0 -424
  94. package/app/node_modules/@types/node/stream/consumers.d.ts +0 -12
  95. package/app/node_modules/@types/node/stream/promises.d.ts +0 -42
  96. package/app/node_modules/@types/node/stream/web.d.ts +0 -330
  97. package/app/node_modules/@types/node/stream.d.ts +0 -1440
  98. package/app/node_modules/@types/node/string_decoder.d.ts +0 -67
  99. package/app/node_modules/@types/node/test.d.ts +0 -783
  100. package/app/node_modules/@types/node/timers/promises.d.ts +0 -93
  101. package/app/node_modules/@types/node/timers.d.ts +0 -101
  102. package/app/node_modules/@types/node/tls.d.ts +0 -1111
  103. package/app/node_modules/@types/node/trace_events.d.ts +0 -171
  104. package/app/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  105. package/app/node_modules/@types/node/ts4.8/assert.d.ts +0 -961
  106. package/app/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -518
  107. package/app/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2323
  108. package/app/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1399
  109. package/app/node_modules/@types/node/ts4.8/cluster.d.ts +0 -410
  110. package/app/node_modules/@types/node/ts4.8/console.d.ts +0 -412
  111. package/app/node_modules/@types/node/ts4.8/constants.d.ts +0 -18
  112. package/app/node_modules/@types/node/ts4.8/crypto.d.ts +0 -3972
  113. package/app/node_modules/@types/node/ts4.8/dgram.d.ts +0 -545
  114. package/app/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -192
  115. package/app/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -370
  116. package/app/node_modules/@types/node/ts4.8/dns.d.ts +0 -660
  117. package/app/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -126
  118. package/app/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  119. package/app/node_modules/@types/node/ts4.8/events.d.ts +0 -682
  120. package/app/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1138
  121. package/app/node_modules/@types/node/ts4.8/fs.d.ts +0 -3875
  122. package/app/node_modules/@types/node/ts4.8/globals.d.ts +0 -302
  123. package/app/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  124. package/app/node_modules/@types/node/ts4.8/http.d.ts +0 -1651
  125. package/app/node_modules/@types/node/ts4.8/http2.d.ts +0 -2133
  126. package/app/node_modules/@types/node/ts4.8/https.d.ts +0 -542
  127. package/app/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  128. package/app/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2741
  129. package/app/node_modules/@types/node/ts4.8/module.d.ts +0 -115
  130. package/app/node_modules/@types/node/ts4.8/net.d.ts +0 -883
  131. package/app/node_modules/@types/node/ts4.8/os.d.ts +0 -473
  132. package/app/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  133. package/app/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -625
  134. package/app/node_modules/@types/node/ts4.8/process.d.ts +0 -1488
  135. package/app/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  136. package/app/node_modules/@types/node/ts4.8/querystring.d.ts +0 -131
  137. package/app/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -143
  138. package/app/node_modules/@types/node/ts4.8/readline.d.ts +0 -653
  139. package/app/node_modules/@types/node/ts4.8/repl.d.ts +0 -424
  140. package/app/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  141. package/app/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -42
  142. package/app/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -330
  143. package/app/node_modules/@types/node/ts4.8/stream.d.ts +0 -1440
  144. package/app/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  145. package/app/node_modules/@types/node/ts4.8/test.d.ts +0 -784
  146. package/app/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  147. package/app/node_modules/@types/node/ts4.8/timers.d.ts +0 -94
  148. package/app/node_modules/@types/node/ts4.8/tls.d.ts +0 -1111
  149. package/app/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -171
  150. package/app/node_modules/@types/node/ts4.8/tty.d.ts +0 -206
  151. package/app/node_modules/@types/node/ts4.8/url.d.ts +0 -902
  152. package/app/node_modules/@types/node/ts4.8/util.d.ts +0 -2017
  153. package/app/node_modules/@types/node/ts4.8/v8.d.ts +0 -541
  154. package/app/node_modules/@types/node/ts4.8/vm.d.ts +0 -644
  155. package/app/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  156. package/app/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -695
  157. package/app/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  158. package/app/node_modules/@types/node/tty.d.ts +0 -206
  159. package/app/node_modules/@types/node/url.d.ts +0 -902
  160. package/app/node_modules/@types/node/util.d.ts +0 -2017
  161. package/app/node_modules/@types/node/v8.d.ts +0 -541
  162. package/app/node_modules/@types/node/vm.d.ts +0 -644
  163. package/app/node_modules/@types/node/wasi.d.ts +0 -158
  164. package/app/node_modules/@types/node/worker_threads.d.ts +0 -695
  165. package/app/node_modules/@types/node/zlib.d.ts +0 -517
  166. package/app/node_modules/@types/qs/LICENSE +0 -21
  167. package/app/node_modules/@types/qs/README.md +0 -16
  168. package/app/node_modules/@types/qs/index.d.ts +0 -62
  169. package/app/node_modules/@types/qs/package.json +0 -65
  170. package/app/node_modules/@types/range-parser/LICENSE +0 -21
  171. package/app/node_modules/@types/range-parser/README.md +0 -55
  172. package/app/node_modules/@types/range-parser/index.d.ts +0 -35
  173. package/app/node_modules/@types/range-parser/package.json +0 -25
  174. package/app/node_modules/@types/send/LICENSE +0 -21
  175. package/app/node_modules/@types/send/README.md +0 -16
  176. package/app/node_modules/@types/send/index.d.ts +0 -231
  177. package/app/node_modules/@types/send/package.json +0 -33
  178. package/app/node_modules/@types/serve-static/LICENSE +0 -21
  179. package/app/node_modules/@types/serve-static/README.md +0 -16
  180. package/app/node_modules/@types/serve-static/index.d.ts +0 -113
  181. package/app/node_modules/@types/serve-static/package.json +0 -38
  182. package/app/node_modules/colors/LICENSE +0 -25
  183. package/app/node_modules/colors/README.md +0 -221
  184. package/app/node_modules/colors/examples/normal-usage.js +0 -82
  185. package/app/node_modules/colors/examples/safe-string.js +0 -79
  186. package/app/node_modules/colors/index.d.ts +0 -136
  187. package/app/node_modules/colors/lib/colors.js +0 -211
  188. package/app/node_modules/colors/lib/custom/trap.js +0 -46
  189. package/app/node_modules/colors/lib/custom/zalgo.js +0 -110
  190. package/app/node_modules/colors/lib/extendStringPrototype.js +0 -110
  191. package/app/node_modules/colors/lib/index.js +0 -13
  192. package/app/node_modules/colors/lib/maps/america.js +0 -10
  193. package/app/node_modules/colors/lib/maps/rainbow.js +0 -12
  194. package/app/node_modules/colors/lib/maps/random.js +0 -11
  195. package/app/node_modules/colors/lib/maps/zebra.js +0 -5
  196. package/app/node_modules/colors/lib/styles.js +0 -95
  197. package/app/node_modules/colors/lib/system/has-flag.js +0 -35
  198. package/app/node_modules/colors/lib/system/supports-colors.js +0 -151
  199. package/app/node_modules/colors/package.json +0 -45
  200. package/app/node_modules/colors/safe.d.ts +0 -48
  201. package/app/node_modules/colors/safe.js +0 -10
  202. package/app/node_modules/colors/themes/generic-logging.js +0 -12
  203. package/app/node_modules/dateformat/LICENSE +0 -20
  204. package/app/node_modules/dateformat/Readme.md +0 -204
  205. package/app/node_modules/dateformat/lib/dateformat.js +0 -1
  206. package/app/node_modules/dateformat/package.json +0 -38
  207. package/app/node_modules/mkdirp/CHANGELOG.md +0 -15
  208. package/app/node_modules/mkdirp/LICENSE +0 -21
  209. package/app/node_modules/mkdirp/bin/cmd.js +0 -68
  210. package/app/node_modules/mkdirp/index.js +0 -31
  211. package/app/node_modules/mkdirp/lib/find-made.js +0 -29
  212. package/app/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
  213. package/app/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
  214. package/app/node_modules/mkdirp/lib/opts-arg.js +0 -23
  215. package/app/node_modules/mkdirp/lib/path-arg.js +0 -29
  216. package/app/node_modules/mkdirp/lib/use-native.js +0 -10
  217. package/app/node_modules/mkdirp/package.json +0 -44
  218. package/app/node_modules/mkdirp/readme.markdown +0 -266
  219. package/app/node_modules/tinytim/.travis.yml +0 -5
  220. package/app/node_modules/tinytim/README.md +0 -212
  221. package/app/node_modules/tinytim/index.js +0 -1
  222. package/app/node_modules/tinytim/lib/index.js +0 -55
  223. package/app/node_modules/tinytim/lib/tinytim.js +0 -50
  224. package/app/node_modules/tinytim/package.json +0 -24
  225. package/app/node_modules/tinytim/test/files/html.tim +0 -1
  226. package/app/node_modules/tinytim/test/files/string.tim +0 -1
  227. package/app/node_modules/tinytim/test/files/string2.tim +0 -1
  228. package/app/node_modules/tinytim/test/render-file-replace.js +0 -39
  229. package/app/node_modules/tinytim/test/render-replace.js +0 -94
  230. package/app/node_modules/tinytim/test/tim-replace.js +0 -95
  231. package/app/node_modules/tracer/README.md +0 -747
  232. package/app/node_modules/tracer/lib/color_console.js +0 -15
  233. package/app/node_modules/tracer/lib/console.js +0 -165
  234. package/app/node_modules/tracer/lib/dailyfile.js +0 -92
  235. package/app/node_modules/tracer/lib/index.js +0 -10
  236. package/app/node_modules/tracer/lib/settings.js +0 -25
  237. package/app/node_modules/tracer/lib/utils.js +0 -58
  238. package/app/node_modules/tracer/package.json +0 -53
  239. package/app/node_modules/tracer/types/index.d.ts +0 -189
  240. package/dist/scaffold/templates/front-page.class.ts.tpl +0 -12
  241. package/dist/scaffold/templates/main.ts.tpl +0 -13
  242. package/dist/scaffold/templates/nodemon.json.tpl +0 -7
  243. package/dist/scaffold/templates/package.json.tpl +0 -16
  244. package/dist/scaffold/templates/tsconfig.json.tpl +0 -20
  245. /package/dist/{core.decorator.js → src/core.decorator.js} +0 -0
  246. /package/dist/{default → src/default}/default-authentication.class.js +0 -0
  247. /package/dist/{default → src/default}/log-default.class.js +0 -0
  248. /package/dist/{default → src/default}/node-cache.class.js +0 -0
  249. /package/dist/{default → src/default}/pages/404.html +0 -0
  250. /package/dist/{default → src/default}/pages/500.html +0 -0
  251. /package/dist/{default → src/default}/read-write-db.class.js +0 -0
  252. /package/dist/{factory → src/factory}/authentication-factory.class.js +0 -0
  253. /package/dist/{factory → src/factory}/cache-factory.class.js +0 -0
  254. /package/dist/{factory → src/factory}/data-source-factory.class.js +0 -0
  255. /package/dist/{factory → src/factory}/log-factory.class.js +0 -0
  256. /package/dist/{factory → src/factory}/server-factory.class.js +0 -0
  257. /package/dist/{route.decorator.js → src/route.decorator.js} +0 -0
  258. /package/dist/{scaffold → src/scaffold}/command.js +0 -0
@@ -1,473 +0,0 @@
1
- /**
2
- * The `os` module provides operating system-related utility methods and
3
- * properties. It can be accessed using:
4
- *
5
- * ```js
6
- * const os = require('os');
7
- * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
9
- */
10
- declare module 'os' {
11
- interface CpuInfo {
12
- model: string;
13
- speed: number;
14
- times: {
15
- user: number;
16
- nice: number;
17
- sys: number;
18
- idle: number;
19
- irq: number;
20
- };
21
- }
22
- interface NetworkInterfaceBase {
23
- address: string;
24
- netmask: string;
25
- mac: string;
26
- internal: boolean;
27
- cidr: string | null;
28
- }
29
- interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
30
- family: 'IPv4';
31
- scopeid?: undefined;
32
- }
33
- interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
34
- family: 'IPv6';
35
- scopeid: number;
36
- }
37
- interface UserInfo<T> {
38
- username: T;
39
- uid: number;
40
- gid: number;
41
- shell: T;
42
- homedir: T;
43
- }
44
- type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
45
- /**
46
- * Returns the host name of the operating system as a string.
47
- * @since v0.3.3
48
- */
49
- function hostname(): string;
50
- /**
51
- * Returns an array containing the 1, 5, and 15 minute load averages.
52
- *
53
- * The load average is a measure of system activity calculated by the operating
54
- * system and expressed as a fractional number.
55
- *
56
- * The load average is a Unix-specific concept. On Windows, the return value is
57
- * always `[0, 0, 0]`.
58
- * @since v0.3.3
59
- */
60
- function loadavg(): number[];
61
- /**
62
- * Returns the system uptime in number of seconds.
63
- * @since v0.3.3
64
- */
65
- function uptime(): number;
66
- /**
67
- * Returns the amount of free system memory in bytes as an integer.
68
- * @since v0.3.3
69
- */
70
- function freemem(): number;
71
- /**
72
- * Returns the total amount of system memory in bytes as an integer.
73
- * @since v0.3.3
74
- */
75
- function totalmem(): number;
76
- /**
77
- * Returns an array of objects containing information about each logical CPU core.
78
- *
79
- * The properties included on each object include:
80
- *
81
- * ```js
82
- * [
83
- * {
84
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
85
- * speed: 2926,
86
- * times: {
87
- * user: 252020,
88
- * nice: 0,
89
- * sys: 30340,
90
- * idle: 1070356870,
91
- * irq: 0
92
- * }
93
- * },
94
- * {
95
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
96
- * speed: 2926,
97
- * times: {
98
- * user: 306960,
99
- * nice: 0,
100
- * sys: 26980,
101
- * idle: 1071569080,
102
- * irq: 0
103
- * }
104
- * },
105
- * {
106
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
107
- * speed: 2926,
108
- * times: {
109
- * user: 248450,
110
- * nice: 0,
111
- * sys: 21750,
112
- * idle: 1070919370,
113
- * irq: 0
114
- * }
115
- * },
116
- * {
117
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
118
- * speed: 2926,
119
- * times: {
120
- * user: 256880,
121
- * nice: 0,
122
- * sys: 19430,
123
- * idle: 1070905480,
124
- * irq: 20
125
- * }
126
- * },
127
- * ]
128
- * ```
129
- *
130
- * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
131
- * are always 0.
132
- * @since v0.3.3
133
- */
134
- function cpus(): CpuInfo[];
135
- /**
136
- * Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
137
- *
138
- * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
139
- * @since 18.4.0
140
- */
141
- function availableParallelism(): number;
142
- /**
143
- * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
144
- * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
145
- *
146
- * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
147
- * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
148
- * @since v0.3.3
149
- */
150
- function type(): string;
151
- /**
152
- * Returns the operating system as a string.
153
- *
154
- * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
155
- * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
156
- * @since v0.3.3
157
- */
158
- function release(): string;
159
- /**
160
- * Returns an object containing network interfaces that have been assigned a
161
- * network address.
162
- *
163
- * Each key on the returned object identifies a network interface. The associated
164
- * value is an array of objects that each describe an assigned network address.
165
- *
166
- * The properties available on the assigned network address object include:
167
- *
168
- * ```js
169
- * {
170
- * lo: [
171
- * {
172
- * address: '127.0.0.1',
173
- * netmask: '255.0.0.0',
174
- * family: 'IPv4',
175
- * mac: '00:00:00:00:00:00',
176
- * internal: true,
177
- * cidr: '127.0.0.1/8'
178
- * },
179
- * {
180
- * address: '::1',
181
- * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
182
- * family: 'IPv6',
183
- * mac: '00:00:00:00:00:00',
184
- * scopeid: 0,
185
- * internal: true,
186
- * cidr: '::1/128'
187
- * }
188
- * ],
189
- * eth0: [
190
- * {
191
- * address: '192.168.1.108',
192
- * netmask: '255.255.255.0',
193
- * family: 'IPv4',
194
- * mac: '01:02:03:0a:0b:0c',
195
- * internal: false,
196
- * cidr: '192.168.1.108/24'
197
- * },
198
- * {
199
- * address: 'fe80::a00:27ff:fe4e:66a1',
200
- * netmask: 'ffff:ffff:ffff:ffff::',
201
- * family: 'IPv6',
202
- * mac: '01:02:03:0a:0b:0c',
203
- * scopeid: 1,
204
- * internal: false,
205
- * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
206
- * }
207
- * ]
208
- * }
209
- * ```
210
- * @since v0.6.0
211
- */
212
- function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
213
- /**
214
- * Returns the string path of the current user's home directory.
215
- *
216
- * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
217
- * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
218
- *
219
- * On Windows, it uses the `USERPROFILE` environment variable if defined.
220
- * Otherwise it uses the path to the profile directory of the current user.
221
- * @since v2.3.0
222
- */
223
- function homedir(): string;
224
- /**
225
- * Returns information about the currently effective user. On POSIX platforms,
226
- * this is typically a subset of the password file. The returned object includes
227
- * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and`gid` fields are `-1`, and `shell` is `null`.
228
- *
229
- * The value of `homedir` returned by `os.userInfo()` is provided by the operating
230
- * system. This differs from the result of `os.homedir()`, which queries
231
- * environment variables for the home directory before falling back to the
232
- * operating system response.
233
- *
234
- * Throws a `SystemError` if a user has no `username` or `homedir`.
235
- * @since v6.0.0
236
- */
237
- function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
238
- function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
239
- type SignalConstants = {
240
- [key in NodeJS.Signals]: number;
241
- };
242
- namespace constants {
243
- const UV_UDP_REUSEADDR: number;
244
- namespace signals {}
245
- const signals: SignalConstants;
246
- namespace errno {
247
- const E2BIG: number;
248
- const EACCES: number;
249
- const EADDRINUSE: number;
250
- const EADDRNOTAVAIL: number;
251
- const EAFNOSUPPORT: number;
252
- const EAGAIN: number;
253
- const EALREADY: number;
254
- const EBADF: number;
255
- const EBADMSG: number;
256
- const EBUSY: number;
257
- const ECANCELED: number;
258
- const ECHILD: number;
259
- const ECONNABORTED: number;
260
- const ECONNREFUSED: number;
261
- const ECONNRESET: number;
262
- const EDEADLK: number;
263
- const EDESTADDRREQ: number;
264
- const EDOM: number;
265
- const EDQUOT: number;
266
- const EEXIST: number;
267
- const EFAULT: number;
268
- const EFBIG: number;
269
- const EHOSTUNREACH: number;
270
- const EIDRM: number;
271
- const EILSEQ: number;
272
- const EINPROGRESS: number;
273
- const EINTR: number;
274
- const EINVAL: number;
275
- const EIO: number;
276
- const EISCONN: number;
277
- const EISDIR: number;
278
- const ELOOP: number;
279
- const EMFILE: number;
280
- const EMLINK: number;
281
- const EMSGSIZE: number;
282
- const EMULTIHOP: number;
283
- const ENAMETOOLONG: number;
284
- const ENETDOWN: number;
285
- const ENETRESET: number;
286
- const ENETUNREACH: number;
287
- const ENFILE: number;
288
- const ENOBUFS: number;
289
- const ENODATA: number;
290
- const ENODEV: number;
291
- const ENOENT: number;
292
- const ENOEXEC: number;
293
- const ENOLCK: number;
294
- const ENOLINK: number;
295
- const ENOMEM: number;
296
- const ENOMSG: number;
297
- const ENOPROTOOPT: number;
298
- const ENOSPC: number;
299
- const ENOSR: number;
300
- const ENOSTR: number;
301
- const ENOSYS: number;
302
- const ENOTCONN: number;
303
- const ENOTDIR: number;
304
- const ENOTEMPTY: number;
305
- const ENOTSOCK: number;
306
- const ENOTSUP: number;
307
- const ENOTTY: number;
308
- const ENXIO: number;
309
- const EOPNOTSUPP: number;
310
- const EOVERFLOW: number;
311
- const EPERM: number;
312
- const EPIPE: number;
313
- const EPROTO: number;
314
- const EPROTONOSUPPORT: number;
315
- const EPROTOTYPE: number;
316
- const ERANGE: number;
317
- const EROFS: number;
318
- const ESPIPE: number;
319
- const ESRCH: number;
320
- const ESTALE: number;
321
- const ETIME: number;
322
- const ETIMEDOUT: number;
323
- const ETXTBSY: number;
324
- const EWOULDBLOCK: number;
325
- const EXDEV: number;
326
- const WSAEINTR: number;
327
- const WSAEBADF: number;
328
- const WSAEACCES: number;
329
- const WSAEFAULT: number;
330
- const WSAEINVAL: number;
331
- const WSAEMFILE: number;
332
- const WSAEWOULDBLOCK: number;
333
- const WSAEINPROGRESS: number;
334
- const WSAEALREADY: number;
335
- const WSAENOTSOCK: number;
336
- const WSAEDESTADDRREQ: number;
337
- const WSAEMSGSIZE: number;
338
- const WSAEPROTOTYPE: number;
339
- const WSAENOPROTOOPT: number;
340
- const WSAEPROTONOSUPPORT: number;
341
- const WSAESOCKTNOSUPPORT: number;
342
- const WSAEOPNOTSUPP: number;
343
- const WSAEPFNOSUPPORT: number;
344
- const WSAEAFNOSUPPORT: number;
345
- const WSAEADDRINUSE: number;
346
- const WSAEADDRNOTAVAIL: number;
347
- const WSAENETDOWN: number;
348
- const WSAENETUNREACH: number;
349
- const WSAENETRESET: number;
350
- const WSAECONNABORTED: number;
351
- const WSAECONNRESET: number;
352
- const WSAENOBUFS: number;
353
- const WSAEISCONN: number;
354
- const WSAENOTCONN: number;
355
- const WSAESHUTDOWN: number;
356
- const WSAETOOMANYREFS: number;
357
- const WSAETIMEDOUT: number;
358
- const WSAECONNREFUSED: number;
359
- const WSAELOOP: number;
360
- const WSAENAMETOOLONG: number;
361
- const WSAEHOSTDOWN: number;
362
- const WSAEHOSTUNREACH: number;
363
- const WSAENOTEMPTY: number;
364
- const WSAEPROCLIM: number;
365
- const WSAEUSERS: number;
366
- const WSAEDQUOT: number;
367
- const WSAESTALE: number;
368
- const WSAEREMOTE: number;
369
- const WSASYSNOTREADY: number;
370
- const WSAVERNOTSUPPORTED: number;
371
- const WSANOTINITIALISED: number;
372
- const WSAEDISCON: number;
373
- const WSAENOMORE: number;
374
- const WSAECANCELLED: number;
375
- const WSAEINVALIDPROCTABLE: number;
376
- const WSAEINVALIDPROVIDER: number;
377
- const WSAEPROVIDERFAILEDINIT: number;
378
- const WSASYSCALLFAILURE: number;
379
- const WSASERVICE_NOT_FOUND: number;
380
- const WSATYPE_NOT_FOUND: number;
381
- const WSA_E_NO_MORE: number;
382
- const WSA_E_CANCELLED: number;
383
- const WSAEREFUSED: number;
384
- }
385
- namespace priority {
386
- const PRIORITY_LOW: number;
387
- const PRIORITY_BELOW_NORMAL: number;
388
- const PRIORITY_NORMAL: number;
389
- const PRIORITY_ABOVE_NORMAL: number;
390
- const PRIORITY_HIGH: number;
391
- const PRIORITY_HIGHEST: number;
392
- }
393
- }
394
- const devNull: string;
395
- const EOL: string;
396
- /**
397
- * Returns the operating system CPU architecture for which the Node.js binary was
398
- * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
399
- *
400
- * The return value is equivalent to `process.arch`.
401
- * @since v0.5.0
402
- */
403
- function arch(): string;
404
- /**
405
- * Returns a string identifying the kernel version.
406
- *
407
- * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
408
- * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
409
- * @since v13.11.0, v12.17.0
410
- */
411
- function version(): string;
412
- /**
413
- * Returns a string identifying the operating system platform for which
414
- * the Node.js binary was compiled. The value is set at compile time.
415
- * Possible values are `'aix'`, `'darwin'`, `'freebsd'`,`'linux'`,`'openbsd'`, `'sunos'`, and `'win32'`.
416
- *
417
- * The return value is equivalent to `process.platform`.
418
- *
419
- * The value `'android'` may also be returned if Node.js is built on the Android
420
- * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
421
- * @since v0.5.0
422
- */
423
- function platform(): NodeJS.Platform;
424
- /**
425
- * Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
426
- *
427
- * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
428
- * On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
429
- * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
430
- * @since v18.9.0
431
- */
432
- function machine(): string;
433
- /**
434
- * Returns the operating system's default directory for temporary files as a
435
- * string.
436
- * @since v0.9.9
437
- */
438
- function tmpdir(): string;
439
- /**
440
- * Returns a string identifying the endianness of the CPU for which the Node.js
441
- * binary was compiled.
442
- *
443
- * Possible values are `'BE'` for big endian and `'LE'` for little endian.
444
- * @since v0.9.4
445
- */
446
- function endianness(): 'BE' | 'LE';
447
- /**
448
- * Returns the scheduling priority for the process specified by `pid`. If `pid` is
449
- * not provided or is `0`, the priority of the current process is returned.
450
- * @since v10.10.0
451
- * @param [pid=0] The process ID to retrieve scheduling priority for.
452
- */
453
- function getPriority(pid?: number): number;
454
- /**
455
- * Attempts to set the scheduling priority for the process specified by `pid`. If`pid` is not provided or is `0`, the process ID of the current process is used.
456
- *
457
- * The `priority` input must be an integer between `-20` (high priority) and `19`(low priority). Due to differences between Unix priority levels and Windows
458
- * priority classes, `priority` is mapped to one of six priority constants in`os.constants.priority`. When retrieving a process priority level, this range
459
- * mapping may cause the return value to be slightly different on Windows. To avoid
460
- * confusion, set `priority` to one of the priority constants.
461
- *
462
- * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
463
- * privileges. Otherwise the set priority will be silently reduced to`PRIORITY_HIGH`.
464
- * @since v10.10.0
465
- * @param [pid=0] The process ID to set scheduling priority for.
466
- * @param priority The scheduling priority to assign to the process.
467
- */
468
- function setPriority(priority: number): void;
469
- function setPriority(pid: number, priority: number): void;
470
- }
471
- declare module 'node:os' {
472
- export * from 'os';
473
- }