wwh пре 1 недеља
родитељ
комит
7af05f7e34
100 измењених фајлова са 0 додато и 39891 уклоњено
  1. 0 9
      scripts/extract-docx-text.mjs
  2. 0 42
      scripts/extract-gis-body.mjs
  3. 0 62
      scripts/extract-gis-paragraphs.mjs
  4. 0 45
      scripts/extract-gis-sections.mjs
  5. 0 34
      scripts/find-gis-snippets.mjs
  6. 0 36
      scripts/parse-gis-api-doc.mjs
  7. 0 116
      test/_std_text.txt
  8. BIN
      test/_std_tpl_extract/template.zip
  9. 0 2
      test/_std_tpl_extract/unzipped/[Content_Types].xml
  10. 0 2
      test/_std_tpl_extract/unzipped/_rels/.rels
  11. 0 2
      test/_std_tpl_extract/unzipped/docProps/app.xml
  12. 0 2
      test/_std_tpl_extract/unzipped/docProps/core.xml
  13. 0 2
      test/_std_tpl_extract/unzipped/docProps/custom.xml
  14. 0 2
      test/_std_tpl_extract/unzipped/word/_rels/document.xml.rels
  15. 0 2
      test/_std_tpl_extract/unzipped/word/document.xml
  16. 0 2
      test/_std_tpl_extract/unzipped/word/fontTable.xml
  17. 0 2
      test/_std_tpl_extract/unzipped/word/settings.xml
  18. 0 2
      test/_std_tpl_extract/unzipped/word/styles.xml
  19. 0 2
      test/_std_tpl_extract/unzipped/word/theme/theme1.xml
  20. BIN
      test/_stp_tpl_extract/template.zip
  21. 0 2
      test/_stp_tpl_extract/unzipped/[Content_Types].xml
  22. 0 2
      test/_stp_tpl_extract/unzipped/_rels/.rels
  23. 0 2
      test/_stp_tpl_extract/unzipped/docProps/app.xml
  24. 0 2
      test/_stp_tpl_extract/unzipped/docProps/core.xml
  25. 0 2
      test/_stp_tpl_extract/unzipped/docProps/custom.xml
  26. 0 2
      test/_stp_tpl_extract/unzipped/word/_rels/document.xml.rels
  27. 0 2
      test/_stp_tpl_extract/unzipped/word/document.xml
  28. 0 2
      test/_stp_tpl_extract/unzipped/word/fontTable.xml
  29. 0 2
      test/_stp_tpl_extract/unzipped/word/settings.xml
  30. 0 2
      test/_stp_tpl_extract/unzipped/word/styles.xml
  31. 0 2
      test/_stp_tpl_extract/unzipped/word/theme/theme1.xml
  32. 0 74
      test/_str_text.txt
  33. BIN
      test/_str_tpl_extract/template.zip
  34. 0 2
      test/_str_tpl_extract/unzipped/[Content_Types].xml
  35. 0 2
      test/_str_tpl_extract/unzipped/_rels/.rels
  36. 0 2
      test/_str_tpl_extract/unzipped/docProps/app.xml
  37. 0 2
      test/_str_tpl_extract/unzipped/docProps/core.xml
  38. 0 2
      test/_str_tpl_extract/unzipped/docProps/custom.xml
  39. 0 2
      test/_str_tpl_extract/unzipped/word/_rels/document.xml.rels
  40. 0 2
      test/_str_tpl_extract/unzipped/word/document.xml
  41. 0 2
      test/_str_tpl_extract/unzipped/word/fontTable.xml
  42. 0 2
      test/_str_tpl_extract/unzipped/word/settings.xml
  43. 0 2
      test/_str_tpl_extract/unzipped/word/styles.xml
  44. 0 2
      test/_str_tpl_extract/unzipped/word/theme/theme1.xml
  45. 0 465
      test/generate-std.js
  46. 0 741
      test/generate-stp.js
  47. 0 334
      test/generate-str.js
  48. 0 16
      test/node_modules/.bin/nanoid
  49. 0 17
      test/node_modules/.bin/nanoid.cmd
  50. 0 28
      test/node_modules/.bin/nanoid.ps1
  51. 0 16
      test/node_modules/.bin/xml-js
  52. 0 17
      test/node_modules/.bin/xml-js.cmd
  53. 0 28
      test/node_modules/.bin/xml-js.ps1
  54. 0 200
      test/node_modules/.package-lock.json
  55. 0 21
      test/node_modules/@types/node/LICENSE
  56. 0 15
      test/node_modules/@types/node/README.md
  57. 0 950
      test/node_modules/@types/node/assert.d.ts
  58. 0 59
      test/node_modules/@types/node/assert/strict.d.ts
  59. 0 711
      test/node_modules/@types/node/async_hooks.d.ts
  60. 0 466
      test/node_modules/@types/node/buffer.buffer.d.ts
  61. 0 1765
      test/node_modules/@types/node/buffer.d.ts
  62. 0 1366
      test/node_modules/@types/node/child_process.d.ts
  63. 0 432
      test/node_modules/@types/node/cluster.d.ts
  64. 0 21
      test/node_modules/@types/node/compatibility/iterators.d.ts
  65. 0 93
      test/node_modules/@types/node/console.d.ts
  66. 0 14
      test/node_modules/@types/node/constants.d.ts
  67. 0 4058
      test/node_modules/@types/node/crypto.d.ts
  68. 0 537
      test/node_modules/@types/node/dgram.d.ts
  69. 0 552
      test/node_modules/@types/node/diagnostics_channel.d.ts
  70. 0 876
      test/node_modules/@types/node/dns.d.ts
  71. 0 497
      test/node_modules/@types/node/dns/promises.d.ts
  72. 0 150
      test/node_modules/@types/node/domain.d.ts
  73. 0 1008
      test/node_modules/@types/node/events.d.ts
  74. 0 4780
      test/node_modules/@types/node/fs.d.ts
  75. 0 1468
      test/node_modules/@types/node/fs/promises.d.ts
  76. 0 150
      test/node_modules/@types/node/globals.d.ts
  77. 0 101
      test/node_modules/@types/node/globals.typedarray.d.ts
  78. 0 2147
      test/node_modules/@types/node/http.d.ts
  79. 0 2488
      test/node_modules/@types/node/http2.d.ts
  80. 0 400
      test/node_modules/@types/node/https.d.ts
  81. 0 117
      test/node_modules/@types/node/index.d.ts
  82. 0 264
      test/node_modules/@types/node/inspector.d.ts
  83. 0 4406
      test/node_modules/@types/node/inspector.generated.d.ts
  84. 0 35
      test/node_modules/@types/node/inspector/promises.d.ts
  85. 0 755
      test/node_modules/@types/node/module.d.ts
  86. 0 970
      test/node_modules/@types/node/net.d.ts
  87. 0 498
      test/node_modules/@types/node/os.d.ts
  88. 0 155
      test/node_modules/@types/node/package.json
  89. 0 178
      test/node_modules/@types/node/path.d.ts
  90. 0 8
      test/node_modules/@types/node/path/posix.d.ts
  91. 0 8
      test/node_modules/@types/node/path/win32.d.ts
  92. 0 612
      test/node_modules/@types/node/perf_hooks.d.ts
  93. 0 2204
      test/node_modules/@types/node/process.d.ts
  94. 0 89
      test/node_modules/@types/node/punycode.d.ts
  95. 0 139
      test/node_modules/@types/node/querystring.d.ts
  96. 0 897
      test/node_modules/@types/node/quic.d.ts
  97. 0 507
      test/node_modules/@types/node/readline.d.ts
  98. 0 158
      test/node_modules/@types/node/readline/promises.d.ts
  99. 0 420
      test/node_modules/@types/node/repl.d.ts
  100. 0 0
      test/node_modules/@types/node/sea.d.ts

+ 0 - 9
scripts/extract-docx-text.mjs

@@ -1,9 +0,0 @@
1
-import fs from 'fs'
2
-import path from 'path'
3
-import os from 'os'
4
-
5
-const raw = path.join(os.tmpdir(), 'gis-doc-raw.xml')
6
-let x = fs.readFileSync(raw, 'utf8')
7
-x = x.replace(/<\/w:p>/g, '\n').replace(/<[^>]+>/g, '')
8
-x = x.replace(/\n{2,}/g, '\n')
9
-process.stdout.write(x)

+ 0 - 42
scripts/extract-gis-body.mjs

@@ -1,42 +0,0 @@
1
-import fs from 'fs'
2
-import path from 'path'
3
-import os from 'os'
4
-
5
-const x = fs.readFileSync(path.join(os.tmpdir(), 'gis-doc-raw.xml'), 'utf8')
6
-
7
-function strip(chunk) {
8
-  return chunk
9
-    .replace(/&lt;/g, '<')
10
-    .replace(/&gt;/g, '>')
11
-    .replace(/&quot;/g, '"')
12
-    .replace(/&amp;/g, '&')
13
-    .replace(/<w:tab[^>]*\/>/g, '\t')
14
-    .replace(/<\/w:p>/g, '\n')
15
-    .replace(/<[^>]+>/g, '')
16
-    .replace(/\n{3,}/g, '\n\n')
17
-}
18
-
19
-const anchors = [
20
-  '部署在GIS服务上',
21
-  'cmmapgl.accessToken',
22
-  '地图密钥',
23
-  '2.3 地图组件',
24
-  '构造一个地图对象',
25
-  'new cmmapgl.Map',
26
-  'cmmapgl.Marker',
27
-  'addSource',
28
-  'addLayer',
29
-  'CMMapDrawControl',
30
-  'DistrictCluster',
31
-  '路线规划'
32
-]
33
-
34
-for (const a of anchors) {
35
-  const i = x.indexOf(a)
36
-  if (i < 0) {
37
-    console.log(`\n[MISS] ${a}`)
38
-    continue
39
-  }
40
-  console.log(`\n######## ${a} ########`)
41
-  console.log(strip(x.slice(i, i + 6000)))
42
-}

+ 0 - 62
scripts/extract-gis-paragraphs.mjs

@@ -1,62 +0,0 @@
1
-import fs from 'fs'
2
-import path from 'path'
3
-import os from 'os'
4
-
5
-const x = fs.readFileSync(path.join(os.tmpdir(), 'gis-doc-raw.xml'), 'utf8')
6
-
7
-function decodeEntities(s) {
8
-  return s
9
-    .replace(/&lt;/g, '<')
10
-    .replace(/&gt;/g, '>')
11
-    .replace(/&quot;/g, '"')
12
-    .replace(/&amp;/g, '&')
13
-}
14
-
15
-function stripXml(chunk) {
16
-  return decodeEntities(chunk)
17
-    .replace(/<w:tab[^>]*\/>/g, '\t')
18
-    .replace(/<\/w:p>/g, '\n')
19
-    .replace(/<[^>]+>/g, '')
20
-    .replace(/\n{3,}/g, '\n\n')
21
-    .trim()
22
-}
23
-
24
-// Collect paragraphs that look like doc body (skip TOC hyperlinks)
25
-const paras = []
26
-for (const m of x.matchAll(/<w:p[\s\S]*?<\/w:p>/g)) {
27
-  const t = stripXml(m[0])
28
-  if (!t || t.length < 4) continue
29
-  if (t.includes('PAGEREF') || t.includes('HYPERLINK \\l')) continue
30
-  if (t.startsWith('TOC ')) continue
31
-  paras.push(t)
32
-}
33
-
34
-const out = []
35
-const keywords = /GIS|cmmap|Map|token|密钥|Marker|GeoJSON|图层|地图|script|container|accessToken|NavigationControl|MouseTool|路线|POI/i
36
-let inSection = false
37
-for (let i = 0; i < paras.length; i++) {
38
-  const p = paras[i]
39
-  if (/^2[\.\s]/.test(p) || /^[0-9]+\s/.test(p) || keywords.test(p)) {
40
-    inSection = true
41
-  }
42
-  if (inSection && keywords.test(p)) {
43
-    out.push(p)
44
-    // include next few lines if code-like
45
-    for (let j = 1; j <= 3 && i + j < paras.length; j++) {
46
-      const n = paras[i + j]
47
-      if (n.includes('{') || n.includes('cmmap') || n.includes('map.') || n.includes('<')) {
48
-        out.push(n)
49
-      }
50
-    }
51
-  }
52
-}
53
-
54
-const unique = [...new Set(out)]
55
-const target = path.resolve('doc/大屏/集中化GIS系统JSAPI接口文档-提取.txt')
56
-fs.writeFileSync(target, unique.join('\n\n'), 'utf8')
57
-console.log('written', target, 'lines', unique.length)
58
-
59
-// Also dump section 2.x headings
60
-const headings = paras.filter((p) => /^[0-9]+(\.[0-9]+)*\s/.test(p) && p.length < 80)
61
-fs.writeFileSync(path.resolve('doc/大屏/集中化GIS系统JSAPI-目录.txt'), headings.join('\n'), 'utf8')
62
-console.log('headings', headings.length)

+ 0 - 45
scripts/extract-gis-sections.mjs

@@ -1,45 +0,0 @@
1
-import fs from 'fs'
2
-import path from 'path'
3
-import os from 'os'
4
-
5
-const x = fs.readFileSync(path.join(os.tmpdir(), 'gis-doc-raw.xml'), 'utf8')
6
-
7
-function strip(chunk) {
8
-  return chunk
9
-    .replace(/<w:tab[^>]*\/>/g, '\t')
10
-    .replace(/<\/w:p>/g, '\n')
11
-    .replace(/<[^>]+>/g, '')
12
-}
13
-
14
-const terms = [
15
-  'cmmapgl.accessToken',
16
-  'setAccessToken',
17
-  '地图密钥',
18
-  '2.3 地图组件',
19
-  'new cmmapgl.Map',
20
-  'NavigationControl',
21
-  'GeoJSON',
22
-  '准备步骤',
23
-  '基本准备'
24
-]
25
-
26
-for (const t of terms) {
27
-  let idx = 0
28
-  let n = 0
29
-  while (n < 3) {
30
-    const found = x.indexOf(t, idx)
31
-    if (found < 0) break
32
-    console.log(`\n==== ${t} #${n + 1} ====`)
33
-    console.log(strip(x.slice(found, found + 2000)))
34
-    idx = found + t.length
35
-    n++
36
-  }
37
-}
38
-
39
-const markers = ['2.2 地图密钥', '2.3 地图组件', '准备步骤', '基本准备', 'cmmapgl.Map']
40
-for (const m of markers) {
41
-  const i = x.indexOf(m)
42
-  if (i < 0) continue
43
-  console.log(`\n######## SECTION ${m} ########`)
44
-  console.log(strip(x.slice(i, i + 12000)))
45
-}

+ 0 - 34
scripts/find-gis-snippets.mjs

@@ -1,34 +0,0 @@
1
-import fs from 'fs'
2
-import path from 'path'
3
-import os from 'os'
4
-
5
-const x = fs.readFileSync(path.join(os.tmpdir(), 'gis-doc-raw.xml'), 'utf8')
6
-
7
-function snippet(k, len = 1800) {
8
-  const i = x.indexOf(k)
9
-  if (i < 0) return `${k}: NOT FOUND`
10
-  return x
11
-    .slice(Math.max(0, i - 200), i + len)
12
-    .replace(/&lt;/g, '<')
13
-    .replace(/&gt;/g, '>')
14
-    .replace(/&quot;/g, '"')
15
-    .replace(/<w:tab[^>]*\/>/g, ' ')
16
-    .replace(/<\/w:p>/g, '\n')
17
-    .replace(/<[^>]+>/g, '')
18
-}
19
-
20
-const keys = [
21
-  'cmmap-gl.js',
22
-  'cmmap-gl.css',
23
-  'cmmapgl.accessToken',
24
-  '地图密钥',
25
-  '地图组件',
26
-  'script src',
27
-  'style:',
28
-  'agis/resources'
29
-]
30
-
31
-for (const k of keys) {
32
-  console.log('\n========', k, '========\n')
33
-  console.log(snippet(k))
34
-}

+ 0 - 36
scripts/parse-gis-api-doc.mjs

@@ -1,36 +0,0 @@
1
-import fs from 'fs'
2
-import os from 'os'
3
-import path from 'path'
4
-
5
-const xmlPath = path.join(os.tmpdir(), 'gis-doc-raw.xml')
6
-const x = fs.readFileSync(xmlPath, 'utf8')
7
-
8
-function strip(chunk) {
9
-  return chunk
10
-    .replace(/&lt;/g, '<')
11
-    .replace(/&gt;/g, '>')
12
-    .replace(/&quot;/g, '"')
13
-    .replace(/&amp;/g, '&')
14
-    .replace(/<w:tab[^>]*\/>/g, '\t')
15
-    .replace(/<\/w:p>/g, '\n')
16
-    .replace(/<[^>]+>/g, '')
17
-    .replace(/\n{3,}/g, '\n\n')
18
-}
19
-
20
-const text = strip(x)
21
-const keys = ['多边形', 'polygon', '周边', '2.2', '2.3', 'longitude', 'latitude', 'radius', 'page_size', 'pageSize', 'POI', '搜索', 'nearby', 'agis/pois']
22
-
23
-for (const k of keys) {
24
-  const i = text.indexOf(k)
25
-  if (i >= 0) {
26
-    console.log(`\n######## ${k} @ ${i} ########`)
27
-    console.log(text.slice(Math.max(0, i - 150), i + 1200))
28
-  }
29
-}
30
-
31
-// dump section around "2.2"
32
-const i22 = text.indexOf('2.2')
33
-if (i22 >= 0) {
34
-  console.log('\n######## FULL 2.2 SECTION ########')
35
-  console.log(text.slice(i22, i22 + 4000))
36
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 116
test/_std_text.txt


BIN
test/_std_tpl_extract/template.zip


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/[Content_Types].xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/_rels/.rels


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/docProps/app.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/docProps/core.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/docProps/custom.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/word/_rels/document.xml.rels


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/word/document.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/word/fontTable.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/word/settings.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/word/styles.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_std_tpl_extract/unzipped/word/theme/theme1.xml


BIN
test/_stp_tpl_extract/template.zip


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/[Content_Types].xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/_rels/.rels


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/docProps/app.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/docProps/core.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/docProps/custom.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/word/_rels/document.xml.rels


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/word/document.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/word/fontTable.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/word/settings.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/word/styles.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_stp_tpl_extract/unzipped/word/theme/theme1.xml


+ 0 - 74
test/_str_text.txt

@@ -1,74 +0,0 @@
1
-7.16
2
-软件测试报告(STR)
3
-说明:
4
-1.《软件测试报告》(STR)是对计算机软件配置项CSCl,软件系统或子系统,或与软件相关项目执行合格性测试的记录。
5
-2.通过STR,需方能够评估所执行的合格性测试及其测试结果。
6
-软件测试报告的正文的格式如下:
7
-1引言
8
-本章应分成以下几条。
9
-1.1标识
10
-本条应包含本文档适用的系统和软件的完整标识,(若适用)包括标识号、标题、缩略词语、版本号、发行号。
11
-1.2系统概述
12
-本条应简述本文档适用的系统和软件的用途。它应描述系统与软件的一般性质;概述系统开发、运行和维护的历史;标识项目的投资方、需方、用户、开发方和支持机构;标识当前和计划的运行现场;并列出其他有关文档。
13
-1.3文档概述
14
-本条应概括本文档的用途与内容,并描述与其使用有关的保密性与私密性要求。
15
-2引用文件
16
-本章应列出本文档引用的所有文档的编号、标题、修订版本和日期。本章还应标识不能通过正常的供货渠道获得的所有文档的来源。
17
-3测试结果概述
18
-本章应分为以下几条提供测试结果的概述。
19
-3.1对被测试软件的总体评估
20
-本条应:
21
-a.根据本报告中所展示的测试结果,提供对该软件的总体评估;
22
-b.标识在测试中检测到的任何遗留的缺陷、限制或约束。可用问题/变更报告提供缺陷信息;
23
-c.
24
-对每一遗留缺陷、限制或约束,应描述:
25
-  1)对软件和系统性能的影响,包括未得到满足的需求的标识;
26
-  2)为了更正它,将对软件和系统设计产生的影响;
27
-  3)推荐的更正方案/方法。
28
-3.2测试环境的影响
29
-本条应对测试环境与操作环境的差异进行评估,并分析这种差异对测试结果的影响。
30
-3.3改进建议
31
-本条应对被测试软件的设计、操作或测试提供改进建议。应讨论每个建议及其对软件的影响。如果没有改进建议,本条应陈述为“无”。
32
-4详细的测试结果
33
-本章应分为以下几条提供每个测试的详细结果。
34
-注:“测试”一词是指一组相关测试用例的集合。
35
-4.x(测试的项目唯一标识符)
36
-本条应由项目唯一标识符标识一个测试,并且分为以下几条描述测试结果。
37
-4.x.1测试结果小结
38
-本条应综述该项测试的结果。应尽可能以表格的形式给出与该测试相关联的每个测试用例的完成状态(例如,“所有结果都如预期的那样”,“遇到了问题”,“与要求的有偏差”等)。当完成状态不是“所预期的”时,本条应引用以下几条提供详细信息。
39
-4.x.2遇到了问题
40
-本条应分条标识遇到一个或多个问题的每一个测试用例。
41
-4.x.2.y(测试用例的项目唯一标识符)
42
-本条应用项目唯一标识符标识遇到一个或多个问题的测试用例,并提供以下内容:
43
-a.所遇到问题的简述;
44
-b.所遇到问题的测试过程步骤的标识;
45
-c.(若适用)对相关问题/变更报告和备份数据的引用;
46
-d
47
-.
48
-试图改正这些问题所重复的过程或步骤次数,以及每次得到的结果;
49
-e.重测试时,是从哪些回退点或测试步骤恢复测试的。
50
-4.x.3与测试用例/过程的偏差
51
-本条应分条标识与测试用例/测试过程出现偏差的每个测试用例。
52
-4.x.3.y(测试用例的项目唯一标识符)
53
-本条应用项目唯一标识符标识出现一个或多个偏差的测试用例,并提供:
54
-a.偏差的说明(例如,出现偏差的测试用例的运行情况和偏差的性质,诸如替换了所需设备、未能遵循规定的步骤、进度安排的偏差等)。(可用红线标记表明有偏差的测试过程);
55
-b.偏差的理由;
56
-c.偏差对测试用例有效性影响的评估。
57
-5测试记录
58
-本章尽可能以图表或附录形式给出一个本报告所覆盖的测试事件的按年月顺序的记录。测试记录应包括:
59
-a.执行测试的日期、时间和地点;
60
-b.用于每个测试的软硬件配置,(若适用)包括所有硬件的部件号/型号/系列号、制造商、修订级和校准日期;所使用的软件部件的版本号和名称;
61
-c.(若适用)与测试有关的每一活动的日期和时间,执行该项活动的人和见证者的身份。
62
-6评价
63
-6.1能力。
64
-6.2缺陷和限制。
65
-6.3建议。
66
-6.4结论。
67
-7测试活动总结
68
-总结主要的测试活动和事件。总结资源消耗,如:
69
-7.1人力消耗。
70
-7.2物质资源消耗。
71
-8注解
72
-本章应包含有助于理解本文档的一般信息(例如背景信息、词汇表、原理)。本章应包含为理解本文档需要的术语和定义,所有缩略语和它们在文档中的含义的字母序列表。
73
-附录
74
-附录可用来提供那些为便于文档维护而单独出版的信息(例如图表、分类数据)。为便于处理,附录可单独装订成册。附录应按字母顺序(A,B等)编排。

BIN
test/_str_tpl_extract/template.zip


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/[Content_Types].xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/_rels/.rels


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/docProps/app.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/docProps/core.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/docProps/custom.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/word/_rels/document.xml.rels


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/word/document.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/word/fontTable.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/word/settings.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/word/styles.xml


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2
test/_str_tpl_extract/unzipped/word/theme/theme1.xml


+ 0 - 465
test/generate-std.js

@@ -1,465 +0,0 @@
1
-const fs = require('fs');
2
-const path = require('path');
3
-const {
4
-  Document, Packer, Paragraph, TextRun,
5
-  Table, TableRow, TableCell, WidthType, AlignmentType, VerticalAlign
6
-} = require('docx');
7
-
8
-const FONT = '宋体';
9
-const SZ = 21;
10
-
11
-function title(t) { return new Paragraph({ spacing: { before: 200, after: 120 }, children: [new TextRun({ text: t, font: FONT, size: SZ, bold: true })] }); }
12
-function h1(t) { return new Paragraph({ spacing: { before: 240, after: 120 }, children: [new TextRun({ text: t, font: FONT, size: SZ, bold: true, color: '0000FF' })] }); }
13
-function h2(t) { return new Paragraph({ spacing: { before: 180, after: 100 }, children: [new TextRun({ text: t, font: FONT, size: SZ, bold: true })] }); }
14
-function h3(t) { return new Paragraph({ spacing: { before: 140, after: 80 }, children: [new TextRun({ text: t, font: FONT, size: SZ, bold: true })] }); }
15
-function p(t) { return new Paragraph({ indent: { firstLine: 420 }, spacing: { after: 90, line: 360 }, children: [new TextRun({ text: t, font: FONT, size: SZ })] }); }
16
-function bullet(t) { return new Paragraph({ indent: { left: 420, hanging: 210 }, spacing: { after: 70, line: 360 }, children: [new TextRun({ text: '• ' + t, font: FONT, size: SZ })] }); }
17
-function step(n, t) { return new Paragraph({ indent: { left: 420 }, spacing: { after: 60, line: 340 }, children: [new TextRun({ text: `${n}. ${t}`, font: FONT, size: SZ })] }); }
18
-
19
-function tbl(headers, rows) {
20
-  return new Table({
21
-    width: { size: 100, type: WidthType.PERCENTAGE },
22
-    rows: [
23
-      new TableRow({ children: headers.map(h => new TableCell({ verticalAlign: VerticalAlign.CENTER, children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, font: FONT, size: 20 })] })] })) }),
24
-      ...rows.map(r => new TableRow({ children: r.map(c => new TableCell({ children: [new Paragraph({ children: [new TextRun({ text: c, font: FONT, size: 20 })] })] })) })),
25
-    ],
26
-  });
27
-}
28
-
29
-const ENV = {
30
-  brainClient: 'http://117.180.211.14/client/',
31
-  brainScreen: 'http://117.180.211.14/screen/',
32
-  brainH5: 'http://117.180.211.14/bqH5/',
33
-  brainJy: 'http://117.180.211.14/bqjy/',
34
-  shopClient: 'http://117.180.211.17/shopClient/',
35
-  shopH5: 'http://117.180.211.17/bqShop/',
36
-};
37
-
38
-function prepBlock(num, id, name, hw, sw, other) {
39
-  return [
40
-    h2(`3.${num}  ${id}  ${name}`),
41
-    p(`本条标识 ${id} 合格性测试的测试准备。`),
42
-    h3(`3.${num}.1  硬件准备`),
43
-    ...hw.map(bullet),
44
-    h3(`3.${num}.2  软件准备`),
45
-    ...sw.map(bullet),
46
-    h3(`3.${num}.3  其他测试前准备`),
47
-    ...other.map(bullet),
48
-  ];
49
-}
50
-
51
-/** 生成符合 GJB 438C 模板的完整测试用例(4.x.y.1~4.x.y.7) */
52
-function tc(sec, sub, id, name, opts) {
53
-  const o = opts || {};
54
-  const prefix = `4.${sec}.${sub}`;
55
-  const req = o.req || `${id} 对应《软件需求规格说明》及合同功能清单中「${name}」相关条款。`;
56
-  const pre = o.pre || [
57
-    'a. 软硬件配置见本章第 3 节对应测试准备;',
58
-    'b. 被测系统服务正常运行,数据库、Redis 缓存可用;',
59
-    'c. 测试账号有效且具备相应角色权限;',
60
-    'd. 测试数据为脱敏模拟数据,符合政务信息安全要求。',
61
-  ];
62
-  const input = o.input || [
63
-    `a. 测试输入名称:${name}业务数据;用途:验证功能正确性;`,
64
-    'b. 输入来源:测试环境预置数据及测试人员按用例构造的有效/边界数据;',
65
-    'c. 测试输入为模拟脱敏数据,不涉及真实个人隐私;',
66
-    'd. 按测试过程步骤顺序输入;',
67
-    'e. 控制方式:采用有效数据验证正常流程,必要时采用边界值及异常值验证系统健壮性。',
68
-  ];
69
-  const expect = o.expect || [
70
-    'a. 系统功能响应正确,页面/接口返回与业务规则一致;',
71
-    'b. 无未捕获异常、无系统崩溃;',
72
-    'c. 操作结果可查询、可追溯;',
73
-    'd. 权限控制有效,无越权访问。',
74
-  ];
75
-  const criteria = o.criteria || [
76
-    'a. 实际结果与 4.x.y.4 预期结果一致,判定为通过;',
77
-    'b. Web 端页面响应时间 ≤ 3 秒(常规查询);接口响应时间 ≤ 2 秒;',
78
-    'c. 允许合理空态展示(如无数据时显示“暂无数据”);',
79
-    'd. 出现与预期不符结果时,记录缺陷并执行重测,重测通过后方可关闭;',
80
-    'e. 不允许出现致命错误、数据丢失或安全越权现象。',
81
-  ];
82
-  const steps = o.steps || [
83
-    `打开被测系统对应访问地址,使用规定测试账号登录;`,
84
-    `按业务路径进入「${name}」相关功能模块;`,
85
-    `执行核心业务操作,记录系统响应;`,
86
-    `核对操作结果与预期是否一致;`,
87
-    `检查操作日志/审计记录是否正确生成(如适用);`,
88
-    `退出或清理测试现场,填写测试记录。`,
89
-  ];
90
-  const assume = o.assume || '假设测试环境网络稳定、服务可用;约束:仅使用脱敏测试数据,禁止在测试环境处理真实公民个人信息;测试过程需方代表可现场见证。';
91
-
92
-  return [
93
-    h3(`${prefix}  ${id}  ${name}`),
94
-    p(`本测试用例用于合格性测试,验证「${name}」功能是否满足合同及需求规格说明要求。`),
95
-    h3(`${prefix}.1  涉及的需求`),
96
-    p(req),
97
-    h3(`${prefix}.2  先决条件`),
98
-    ...pre.map(x => (x.startsWith('a.') || x.startsWith('b.')) ? p(x) : bullet(x)),
99
-    h3(`${prefix}.3  测试输入`),
100
-    ...input.map(x => (x.match(/^[a-e]\./)) ? p(x) : bullet(x)),
101
-    h3(`${prefix}.4  预期测试结果`),
102
-    ...expect.map(x => (x.match(/^[a-d]\./)) ? p(x) : bullet(x)),
103
-    h3(`${prefix}.5  评价结果的准则`),
104
-    ...criteria.map(x => (x.match(/^[a-e]\./)) ? p(x) : bullet(x)),
105
-    h3(`${prefix}.6  测试过程`),
106
-    ...steps.map((s, i) => step(i + 1, s)),
107
-    h3(`${prefix}.7  假设和约束`),
108
-    p(assume),
109
-  ];
110
-}
111
-
112
-function testSection(sec, id, name, cases) {
113
-  return [
114
-    h2(`4.${sec}  ${id}  ${name}`),
115
-    p(`本条标识 ${id} 合格性测试,共 ${cases.length} 条代表性测试用例(详细说明)。全部用例目录见附录 A。`),
116
-    ...cases.flatMap((c, i) => tc(sec, i + 1, c.id, c.name, c)),
117
-  ];
118
-}
119
-
120
-// —— 代表性测试用例(与 STR 第 4 章及 STP 用例统计一致)——
121
-const CLIENT_CASES = [
122
-  { id: 'TC-CL-001', name: '系统登录与 JWT 鉴权', req: 'REQ-CL-SYS-001:系统应提供基于 JWT 的统一身份认证,符合政务信息系统安全要求。', steps: [`打开 ${ENV.brainClient},进入登录页`, '输入 admin / admin123,点击登录', '确认进入系统首页,左侧菜单正常加载', 'F12 网络面板确认 Token 写入且后续请求携带 Authorization', '退出登录,确认返回登录页且无法直接访问受保护页面'] },
123
-  { id: 'TC-CL-002', name: '角色权限 RBAC 控制', req: 'REQ-CL-SYS-002:系统应实现 RBAC 细粒度权限控制,不同角色菜单与操作隔离。', steps: ['使用 admin 登录,记录可见菜单集合', '进入「系统管理-角色管理」,确认角色配置完整', '进入「系统管理-用户管理」,确认用户角色绑定正确', '验证无权限菜单不可见、无权限接口返回 403'] },
124
-  { id: 'TC-CL-003', name: '交易市场—供应商管理', req: 'REQ-CL-TM-001:平台应支持供应商档案的增删改查及状态管理。', steps: ['登录后台,进入「交易市场-供应商管理」', '查询供应商列表,确认分页正常', '新增/编辑测试供应商,保存成功', '禁用/启用供应商,状态变更正确'] },
125
-  { id: 'TC-CL-004', name: '交易市场—订单与结算', req: 'REQ-CL-TM-002:平台应支持交易订单查询、详情查看及结算管理。', steps: ['进入「交易市场-交易订单」', '无条件查询,确认列表展示或空态正确', '按订单号精确查询,结果正确', '打开订单详情,核对字段与数据库一致'] },
126
-  { id: 'TC-CL-005', name: '疫病诊疗—兽医资源管理', req: 'REQ-CL-DT-001:平台应维护兽医资源信息供移动端预约使用。', steps: ['进入「疫病诊疗-兽医管理」', '查询兽医列表,确认数据完整', '新增/编辑兽医信息,保存成功', '确认移动端可查询到该兽医(联调验证)'] },
127
-  { id: 'TC-CL-006', name: '疫病诊疗—在线预约管理', req: 'REQ-CL-DT-002:平台应支持查看和处理牧民提交的预约申请。', steps: ['进入「疫病诊疗-预约管理」', '查询预约列表,确认状态筛选正常', '处理待确认预约(确认/拒绝),状态流转正确', '核对预约记录与移动端提交一致'] },
128
-  { id: 'TC-CL-007', name: '养殖标准体系台账维护', req: 'REQ-CL-SS-001:平台应支持养殖标准、规范文档的台账化管理。', steps: ['进入「养殖标准」相关菜单', '查询标准台账列表', '新增/编辑标准条目,附件上传正常', '发布/下架标准,前端可正确展示'] },
129
-  { id: 'TC-CL-008', name: '产业政策—项目补贴管理', req: 'REQ-CL-IP-001:平台应支持产业政策项目及补贴信息管理。', steps: ['进入「产业政策-项目管理」', '查询项目列表,分页正常', '新增/编辑政策项目,保存成功', '确认项目信息可在相关展示模块引用'] },
130
-  { id: 'TC-CL-009', name: '共同富裕—项目成果管理', req: 'REQ-CL-CP-001:平台应支持共同富裕示范项目及成果信息管理。', steps: ['进入「共同富裕-成果管理」', '查询成果列表', '新增/编辑成果条目,保存成功', '确认大屏共同富裕模块可展示该数据'] },
131
-  { id: 'TC-CL-010', name: '产业数据—牧场草地管理', req: 'REQ-CL-DM-001:平台应支持牧场、草地等资源数据模型管理。', steps: ['进入「产业数据-牧场管理」或「草地管理」', '查询资源列表,地图/列表展示正常', '新增/编辑资源数据,坐标及属性保存正确', '确认大屏畜牧资源模块数据一致'] },
132
-  { id: 'TC-CL-011', name: '资讯内容—养殖资讯发布', req: 'REQ-CL-NEWS-001:平台应支持养殖资讯的编辑、发布与管理。', steps: ['进入「资讯管理」', '新增资讯,编辑富文本内容', '发布资讯,状态变为已发布', '在牧民 H5 首页确认资讯可见'] },
133
-  { id: 'TC-CL-012', name: '系统管理—用户/角色/菜单', req: 'REQ-CL-SYS-003:平台应提供用户、角色、菜单等系统管理能力。', steps: ['进入「系统管理-用户管理」,查询用户列表', '进入「角色管理」,确认角色权限配置', '进入「菜单管理」,确认菜单树结构完整', '新增测试用户并分配角色,验证权限生效'] },
134
-  { id: 'TC-CL-013', name: '操作日志与审计记录', req: 'REQ-CL-SYS-004:系统应记录关键操作日志,满足政务审计要求。', steps: ['执行一条可审计的业务操作(如修改用户)', '进入「系统监控-操作日志」', '按操作人/时间查询,确认日志记录完整', '核对日志含操作人、时间、模块、结果等字段'] },
135
-  { id: 'TC-CL-014', name: '文件上传与附件管理', req: 'REQ-CL-COM-001:系统应支持业务附件的安全上传与访问。', steps: ['在需上传附件的业务表单中选择文件', '上传 jpg/png/pdf 等允许格式,确认成功', '尝试上传不允许格式,系统应拒绝', '下载/预览已上传附件,内容正确'] },
136
-  { id: 'TC-CL-015', name: '数据字典与参数配置', req: 'REQ-CL-SYS-005:系统应支持数据字典及系统参数配置。', steps: ['进入「系统管理-字典管理」', '查询字典类型及字典数据', '修改字典项,确认业务模块引用更新', '进入「参数设置」,确认关键参数可配置'] },
137
-];
138
-
139
-const SCREEN_CASES = [
140
-  { id: 'TC-SC-001', name: '大屏登录鉴权', steps: [`全屏访问 ${ENV.brainScreen}`, '输入 admin / admin123 登录', '确认进入大屏首页,无 JS 报错'] },
141
-  { id: 'TC-SC-002', name: '数字畜牧一张图首页', steps: ['登录后查看首页各 KPI 卡片', '确认地图/图表区域渲染完成', '目视检查核心指标有数值或合理空态'] },
142
-  { id: 'TC-SC-003', name: '畜牧资源专题展示', steps: ['进入畜牧资源专题模块', '确认资源分布、存栏等图表展示', '与后台源数据抽样核对一致'] },
143
-  { id: 'TC-SC-004', name: '交易销售专题(含商城数据)', steps: ['进入交易销售专题', '记录品类销售、热销排行数据', '与商城 Open API 返回值对比一致(允许缓存 TTL 延迟)'] },
144
-  { id: 'TC-SC-005', name: '共同富裕专题展示', steps: ['进入共同富裕专题', '确认项目成果、指标图表展示正常', '与后台共同富裕模块数据一致'] },
145
-  { id: 'TC-SC-006', name: '疫病风险专题展示', steps: ['进入疫病风险专题', '确认风险等级、预警信息展示', '数据口径与后台一致'] },
146
-  { id: 'TC-SC-007', name: '大屏数据刷新与指标一致性', steps: ['记录当前指标数值', '后台修改源数据或等待自动刷新', '确认大屏数据更新,前后逻辑一致'] },
147
-  { id: 'TC-SC-008', name: '大屏全屏展示兼容性', steps: ['在 1920×1080 分辨率全屏展示', '检查各模块布局无重叠、无截断', '切换浏览器缩放,布局自适应正常'] },
148
-];
149
-
150
-const H5_CASES = [
151
-  { id: 'TC-H5-001', name: '牧民用户注册登录', steps: [`打开 ${ENV.brainH5}`, '使用 ceshi3 / 123456 登录', '确认进入首页,底部 Tab 正常'] },
152
-  { id: 'TC-H5-002', name: '首页资讯浏览', steps: ['在首页浏览资讯列表', '点击资讯进入详情', '确认内容展示完整'] },
153
-  { id: 'TC-H5-003', name: '农技课堂与资源查询', steps: ['进入农技课堂或资源模块', '浏览课程/资源列表', '进入详情页,确认可正常访问'] },
154
-  { id: 'TC-H5-004', name: '在线预约兽医服务', steps: ['进入预约入口,选择预约兽医', '选择时间段,填写备注,提交', '在「我的预约」确认记录存在'] },
155
-  { id: 'TC-H5-005', name: '在线预约专家/机构', steps: ['选择预约专家或机构', '填写预约信息并提交', '确认预约列表状态正确'] },
156
-  { id: 'TC-H5-006', name: 'AI 智能助手对话', steps: ['进入 AI 助手模块', '输入测试问题,发送', '确认收到合理回复,无服务异常'] },
157
-  { id: 'TC-H5-007', name: '消息通知与个人中心', steps: ['进入「消息」Tab,查看通知列表', '进入「我的」,查看个人信息', '修改头像/昵称(如支持),保存成功'] },
158
-  { id: 'TC-H5-008', name: '移动端兼容性(微信/浏览器)', steps: ['在微信内置浏览器执行登录及核心流程', '在 Chrome 移动模拟模式重复', '确认两种环境功能一致,无布局错乱'] },
159
-];
160
-
161
-const JY_CASES = [
162
-  { id: 'TC-JY-001', name: '供应商登录与权限', steps: [`打开 ${ENV.brainJy},使用 gys0014 / 123456 登录`, '确认进入供应商首页', '记录可见菜单,确认为供应商角色菜单'] },
163
-  { id: 'TC-JY-002', name: '供应商订单管理', steps: ['进入订单列表', '查询订单,确认仅展示本供应商数据', '查看订单详情,字段完整'] },
164
-  { id: 'TC-JY-003', name: '承销商登录与权限', steps: [`使用 cxs0012 / 123456 登录 ${ENV.brainJy}`, '确认进入承销商首页', '菜单与供应商角色不同'] },
165
-  { id: 'TC-JY-004', name: '承销商订单管理', steps: ['进入承销商订单列表', '确认数据归属正确', '执行允许的操作(查看/确认等)'] },
166
-  { id: 'TC-JY-005', name: '角色数据隔离验证', steps: ['分别使用 gys0014、cxs0012 登录', '对比两者可见订单数据', '确认无交叉越权'] },
167
-  { id: 'TC-JY-006', name: '市场行情信息查看', steps: ['进入行情模块', '查看行情列表/详情', '确认数据展示正常'] },
168
-  { id: 'TC-JY-007', name: '市场进栏登记业务', steps: ['进入进栏登记功能', '填写登记信息并提交', '确认后台可查询该记录'] },
169
-];
170
-
171
-const SHOP_CLIENT_CASES = [
172
-  { id: 'TC-SH-001', name: '平台管理员登录', steps: [`打开 ${ENV.shopClient}`, 'admin / admin123 登录', '确认平台级菜单可见'] },
173
-  { id: 'TC-SH-002', name: '商户入驻审核', steps: ['进入「商户管理-入驻审核」', '选择待审核商户,审核通过/驳回', '确认状态变更及通知'] },
174
-  { id: 'TC-SH-003', name: '店铺管理与审核', steps: ['进入店铺管理', '审核待审店铺', '确认店铺状态流转正确'] },
175
-  { id: 'TC-SH-004', name: '商品审核与上下架', steps: ['进入「商品审核」', '审核通过待审商品', '确认 C 端可搜索到(已上架)'] },
176
-  { id: 'TC-SH-005', name: '平台订单监管查询', steps: ['进入平台订单管理', '多条件查询订单', '查看订单详情,字段完整'] },
177
-  { id: 'TC-SH-006', name: '财务提现审核', steps: ['进入财务提现审核', '处理待审核提现申请', '确认状态及金额正确'] },
178
-  { id: 'TC-SH-007', name: '商城内容与协议管理', steps: ['进入内容/协议管理', '编辑并发布内容', 'C 端确认展示更新'] },
179
-  { id: 'TC-SH-008', name: 'Open API 统计接口', steps: ['使用 Postman 带 Token 调用 /api/open/stats/overview', '确认返回 200 及正确 JSON 结构', '无 Token 调用确认返回 401'] },
180
-  { id: 'TC-SH-009', name: '店铺端—商品发布', steps: ['切换至店铺上下文', '新增商品,填写信息并提交审核', '确认进入待审核状态'] },
181
-  { id: 'TC-SH-010', name: '店铺端—订单发货', steps: ['查看待发货订单', '填写物流信息,确认发货', '订单状态变为待收货'] },
182
-  { id: 'TC-SH-011', name: '店铺端—库存管理', steps: ['进入库存管理', '调整库存数量', '确认商品详情库存同步更新'] },
183
-  { id: 'TC-SH-012', name: '店铺端—售后处理', steps: ['查看待处理售后单', '同意/拒绝售后申请', '确认 C 端售后状态同步'] },
184
-];
185
-
186
-const SHOP_APP_CASES = [
187
-  { id: 'TC-AP-001', name: '会员注册登录', steps: [`打开 ${ENV.shopH5}`, 'test / 123456 登录', '确认进入商城首页'] },
188
-  { id: 'TC-AP-002', name: '首页 Banner 与推荐', steps: ['浏览首页 Banner 轮播', '查看推荐商品区域', '点击跳转正常'] },
189
-  { id: 'TC-AP-003', name: '分类导航与商品搜索', steps: ['点击分类进入列表', '使用搜索框搜索商品', '结果与关键字匹配'] },
190
-  { id: 'TC-AP-004', name: '商品详情与店铺主页', steps: ['进入商品详情', '查看价格、库存、店铺信息', '进入店铺主页,展示正常'] },
191
-  { id: 'TC-AP-005', name: '购物车与同店结算', steps: ['商品加入购物车', '进入购物车勾选商品', '同店商品可合并结算,跨店提示正确'] },
192
-  { id: 'TC-AP-006', name: '下单与支付流程', steps: ['提交订单,选择收货地址', '发起支付(测试环境模拟通道)', '支付成功,订单变为待发货'] },
193
-  { id: 'TC-AP-007', name: '订单跟踪与确认收货', steps: ['在「我的订单」查看物流', '确认收货', '订单状态变为已完成'] },
194
-  { id: 'TC-AP-008', name: '售后申请与评价', steps: ['对已完成订单申请售后或评价', '提交成功,状态正确', '商家端可见(联调)'] },
195
-  { id: 'TC-AP-009', name: '收货地址管理', steps: ['进入地址管理', '新增/编辑/删除地址', '结算时可选择地址'] },
196
-  { id: 'TC-AP-010', name: '商户入驻申请(C端)', steps: ['进入商户入驻入口', '填写入驻信息并提交', '平台后台可见待审核申请'] },
197
-];
198
-
199
-// —— 附录 A:312 条用例全目录(与 STP/STR 统计一致)——
200
-function buildCatalog() {
201
-  const quotas = [
202
-    { csci: 'BQ-BRAIN-CLIENT', prefix: 'TC-CL', total: 86, modules: ['供应商管理', '承销商管理', '交易结算', '行情维护', '兽医排班', '专家机构', '预约规则', '标准分类', '补贴审核', '成果报表'] },
203
-    { csci: 'BQ-BRAIN-SCREEN', prefix: 'TC-SC', total: 32, modules: ['产业概览', '气象展示', '地图交互', '图表联动', '权限控制'] },
204
-    { csci: 'BQ-BRAIN-H5', prefix: 'TC-H5', total: 48, modules: ['用户注册', '密码找回', '收藏分享', '浏览历史', '预约取消', '预约评价', '消息已读', '隐私协议'] },
205
-    { csci: 'BQ-BRAIN-JY', prefix: 'TC-JY', total: 38, modules: ['订单流转', '订单取消', '供应商资料', '承销商资料', '交易统计', '消息推送', '登录安全'] },
206
-    { csci: 'BQ-SHOP-CLIENT', prefix: 'TC-SH', total: 58, modules: ['资质审核', '店铺分类', '运费模板', '优惠券', 'Banner', '会员等级', '财务对账', '退款审核', 'Token管理', '员工管理'] },
207
-    { csci: 'BQ-SHOP-APP', prefix: 'TC-AP', total: 50, modules: ['商品收藏', '优惠券', '订单取消', '物流详情', '退款进度', '评价列表', '店铺关注', '搜索历史'] },
208
-  ];
209
-  const detailedMap = {
210
-    'BQ-BRAIN-CLIENT': CLIENT_CASES,
211
-    'BQ-BRAIN-SCREEN': SCREEN_CASES,
212
-    'BQ-BRAIN-H5': H5_CASES,
213
-    'BQ-BRAIN-JY': JY_CASES,
214
-    'BQ-SHOP-CLIENT': SHOP_CLIENT_CASES,
215
-    'BQ-SHOP-APP': SHOP_APP_CASES,
216
-  };
217
-  const all = [];
218
-  quotas.forEach(q => {
219
-    const detailed = detailedMap[q.csci];
220
-    detailed.forEach(c => all.push([c.id, c.name, q.csci, '核心业务', '第4章详述']));
221
-    let n = 1;
222
-    let extIdx = 0;
223
-    while (all.filter(r => r[2] === q.csci).length < q.total) {
224
-      const id = `${q.prefix}-${String(n).padStart(3, '0')}`;
225
-      n++;
226
-      if (all.find(r => r[0] === id)) continue;
227
-      const mod = q.modules[extIdx % q.modules.length];
228
-      extIdx++;
229
-      all.push([id, `${mod}—扩展场景${extIdx}`, q.csci, mod, '附录A']);
230
-    }
231
-  });
232
-  return all.sort((a, b) => a[0].localeCompare(b[0]));
233
-}
234
-
235
-const HW_PC = [
236
-  'a. 测试客户端 PC:Intel/AMD 4 核及以上 CPU、8GB 及以上内存、1920×1080 显示器;',
237
-  'b. 网络:政务专网或互联网,可稳定访问对应测试服务器;',
238
-  'c. 浏览器:Google Chrome 120+ 或 Microsoft Edge 120+(政务办公常用环境);',
239
-  'd. 连接方式:标准以太网/Wi-Fi,无需特殊开关或电缆配置。',
240
-];
241
-const HW_MOB = [
242
-  'a. 测试手机:Android 10+ 或 iOS 14+,屏幕 6 英寸及以上;',
243
-  'b. 网络:4G/5G/Wi-Fi,可访问 H5 地址;',
244
-  'c. 微信客户端(涉及微信支付及微信浏览器兼容性测试时);',
245
-  'd. 或使用 PC 浏览器移动设备模拟模式(375×812)。',
246
-];
247
-const HW_SCREEN = [
248
-  'a. 大屏展示终端或 PC:1920×1080 及以上分辨率,独立显卡;',
249
-  'b. 浏览器:Google Chrome 120+ 全屏模式;',
250
-  'c. 网络:可访问 117.180.211.14/screen/ 及 117.180.211.17 Open API。',
251
-];
252
-
253
-const catalog = buildCatalog();
254
-
255
-const children = [
256
-  title('7.15  软件测试说明(STD)'),
257
-  title('巴青牧业大脑及巴青农资商城信息化建设项目'),
258
-  p(''),
259
-
260
-  h1('说明'),
261
-  p('1.《软件测试说明》(STD)描述执行计算机软件配置项 CSCI、系统或子系统合格性测试所用到的测试准备、测试用例及测试过程。'),
262
-  p('2.通过 STD 需方能够评估所执行的合格性测试是否充分。'),
263
-  p(''),
264
-
265
-  h1('1  引言'),
266
-
267
-  h2('1.1  标识'),
268
-  p('本条标识如下:'),
269
-  tbl(['项目', '内容'], [
270
-    ['文档标识号', 'BQ-STD-V1.0'],
271
-    ['文档标题', '巴青牧业大脑软件测试说明'],
272
-    ['项目名称', '巴青牧业大脑及巴青农资商城信息化建设项目'],
273
-    ['缩略语', 'STD—软件测试说明;BQ—巴青'],
274
-    ['文档版本号', 'V1.0'],
275
-    ['发行号', '001'],
276
-    ['被测软件版本', 'V1.0'],
277
-  ]),
278
-  tbl(['CSCI 标识', '配置项名称', '版本'], [
279
-    ['BQ-BRAIN-CLIENT', '巴青牧业大脑—运营管理后台', 'V1.0'],
280
-    ['BQ-BRAIN-SCREEN', '巴青牧业大脑—数字畜牧可视化大屏', 'V1.0'],
281
-    ['BQ-BRAIN-H5', '巴青牧业大脑—牧民综合服务移动端', 'V1.0'],
282
-    ['BQ-BRAIN-JY', '巴青牧业大脑—牦牛交易市场移动端', 'V1.0'],
283
-    ['BQ-SHOP-CLIENT', '巴青农资商城—平台及店铺管理后台', 'V1.0'],
284
-    ['BQ-SHOP-APP', '巴青农资商城—消费者移动端', 'V1.0'],
285
-  ]),
286
-
287
-  h2('1.2  系统概述'),
288
-  p('巴青牧业大脑及巴青农资商城信息化建设项目,是西藏自治区巴青县落实数字乡村战略、推动牦牛产业高质量发展的重要政务信息化工程。系统实现畜牧资源管理、疫病诊疗、养殖标准、牦牛交易市场、产业政策、共同富裕成果展示、产业数据决策分析及农资电商交易等功能,形成“产业管理+便民服务+电商交易”一体化数字化体系。'),
289
-  p('巴青牧业大脑部署于 117.180.211.14(/client/、/screen/、/bqH5/、/bqjy/);巴青农资商城部署于 117.180.211.17(/shopClient/、/bqShop/)。两系统通过 Open API 实现统计数据互联互通。'),
290
-  p('投资方/需方:巴青县人民政府;用户:县农牧局、各乡镇、合作社、牧民群众、农资商户及消费者;开发方:项目承建单位;测试组织:第三方测试机构;支持机构:项目监理单位。当前运行现场:上述集成测试环境;计划运行现场:政务云/政务专网生产环境。'),
291
-
292
-  h2('1.3  文档概述'),
293
-  p('本文档依据 GJB 438C-2021 及《巴青牧业大脑软件测试计划(STP)》,描述合格性测试的测试准备(第 3 章)、测试用例及测试过程(第 4 章)。本说明覆盖 6 个 CSCI、52 个业务功能模块,共设计测试用例 312 条,需求可追溯覆盖率 100%。第 4 章给出 60 条代表性用例的详细说明;全部 312 条用例目录见附录 A。'),
294
-  p('注意:测试数据均为脱敏模拟数据,测试人员应遵守政务信息安全保密规定,未经授权不得复制、传播测试账号及系统数据。'),
295
-
296
-  h1('2  引用文件'),
297
-  tbl(['编号', '标题', '修订版本', '日期', '来源'], [
298
-    ['REF-01', 'GJB 438C-2021 军用软件开发文档通用要求', '2021版', '2021-08', '国家军用标准'],
299
-    ['REF-02', '巴青牧业大脑及农资商城信息化建设合同/任务书', 'V1.0', '2025-12', '项目档案'],
300
-    ['REF-03', '巴青牧业大脑软件测试计划(STP)', 'V1.0', '2026-06', 'test/'],
301
-    ['REF-04', '软件需求规格说明及功能需求文档汇编', 'V1.0', '2026-05', 'doc/'],
302
-    ['REF-05', '农资商城功能清单', 'V2.0', '2026-05', 'baqing-shop/doc/'],
303
-    ['REF-06', '系统部署手册及环境配置说明', 'V1.0', '2026-05', '项目档案'],
304
-  ]),
305
-
306
-  h1('3  测试准备'),
307
-  p('注意:测试过程中使用的数据均为脱敏模拟数据,严禁在测试环境录入真实公民个人信息。测试现场由需方协调提供,测试过程接受需方代表及监理单位监督见证。'),
308
-
309
-  ...prepBlock(1, 'BQ-BRAIN-CLIENT', '运营管理后台', HW_PC, [
310
-    'a. 被测软件:ruoyi-ui 前端 + baqing-admin 后端,访问地址 ' + ENV.brainClient,
311
-    'b. 测试账号:admin / admin123(超级管理员);',
312
-    'c. 支撑软件:MySQL 8.0、Redis 6.x、Nginx 1.20+、JDK 1.8;',
313
-    'd. 加载步骤:打开 Chrome → 输入上述 URL → 等待登录页加载完成;',
314
-    'e. 共用初始化:清除浏览器缓存后首次登录,确认 JWT Token 写入;各用例执行前确认 admin 账号处于可用状态。',
315
-  ], [
316
-    '测试负责人确认被测版本 Tag(v1.0.0-test)与 STP 基线一致;',
317
-    '交易市场、疫病诊疗、养殖标准等 18 个模块测试数据就绪;',
318
-    '缺陷管理工具就绪,测试记录模板准备完毕;',
319
-    '需方业务代表参与测试启动见证。',
320
-  ]),
321
-
322
-  ...prepBlock(2, 'BQ-BRAIN-SCREEN', '数字畜牧可视化大屏', HW_SCREEN, [
323
-    'a. 被测软件:ruoyi-screen(Vue 3 + ECharts),访问地址 ' + ENV.brainScreen,
324
-    'b. 测试账号:admin / admin123;',
325
-    'c. 依赖软件:商城 Open API 服务(117.180.211.17)可用;',
326
-    'd. 加载步骤:Chrome 全屏打开上述 URL → 登录 → 进入首页大屏;',
327
-    'e. 共用初始化:确认 Open API Token 已配置,大屏各模块数据刷新机制正常。',
328
-  ], [
329
-    '确认大屏各模块指标数据口径文档;',
330
-    '准备对比用的后台源数据;',
331
-    '需方代表确认展示指标业务含义。',
332
-  ]),
333
-
334
-  ...prepBlock(3, 'BQ-BRAIN-H5', '牧民综合服务移动端', HW_MOB, [
335
-    'a. 被测软件:ruoyi-ui-app H5,访问地址 ' + ENV.brainH5,
336
-    'b. 测试账号:ceshi3 / 123456;',
337
-    'c. 加载步骤:手机浏览器或模拟器打开 URL → 登录/进入首页;',
338
-    'e. 共用初始化:确认 AI 助手、预约服务后端可用。',
339
-  ], [
340
-    '准备兽医/专家/机构预约测试数据;',
341
-    '确认资讯、农技课堂等内容数据已发布;',
342
-    '微信浏览器与 Chrome 模拟两种环境均就绪。',
343
-  ]),
344
-
345
-  ...prepBlock(4, 'BQ-BRAIN-JY', '牦牛交易市场移动端', HW_MOB, [
346
-    'a. 被测软件:ruoyi-jiaoyi H5,访问地址 ' + ENV.brainJy,
347
-    'b. 供应商账号:gys0014 / 123456;承销商账号:cxs0012 / 123456;',
348
-    'c. 加载步骤:分别使用两种角色账号登录,验证权限隔离;',
349
-    'e. 共用初始化:后台已维护供应商/承销商主档及测试订单。',
350
-  ], [
351
-    '准备行情、进栏登记相关测试数据;',
352
-    '需方交易市场业务代表参与关键用例见证。',
353
-  ]),
354
-
355
-  ...prepBlock(5, 'BQ-SHOP-CLIENT', '农资商城平台及店铺后台', HW_PC, [
356
-    'a. 被测软件:ruoyi-ui + baqing-shop 后端,访问地址 ' + ENV.shopClient,
357
-    'b. 测试账号:admin / admin123(平台管理员);',
358
-    'c. 支撑软件:MySQL 8.0、Redis 6.x、支付模拟通道;',
359
-    'd. 加载步骤:打开 URL → 登录平台后台;',
360
-    'e. 共用初始化:Open API Token 已配置;商户/店铺/商品测试数据就绪。',
361
-  ], [
362
-    '准备待审核商户、店铺、商品及测试订单;',
363
-    '支付 Mock 环境已启用;',
364
-    '店铺端测试需切换店铺上下文。',
365
-  ]),
366
-
367
-  ...prepBlock(6, 'BQ-SHOP-APP', '农资商城消费者移动端', HW_MOB, [
368
-    'a. 被测软件:shop-app H5,访问地址 ' + ENV.shopH5,
369
-    'b. 测试账号:test / 123456;',
370
-    'c. 加载步骤:手机浏览器打开 URL → 会员登录;',
371
-    'e. 共用初始化:确认已有上架商品、运费模板;会员收货地址就绪。',
372
-  ], [
373
-    '支付模拟通道可用;',
374
-    '购物车、待发货/已完成订单测试数据就绪;',
375
-    '微信浏览器环境就绪(支付场景)。',
376
-  ]),
377
-
378
-  h1('4  测试说明'),
379
-  p('注意:执行测试过程时应逐项记录实际结果,与预期结果比对后判定通过/不通过。核心业务流程用例需需方代表见证。'),
380
-  p('本章按 CSCI 分条给出代表性测试用例详细说明(含 4.x.y.1~4.x.y.7 全部子节)。'),
381
-
382
-  ...testSection(1, 'BQ-BRAIN-CLIENT', '运营管理后台合格性测试', CLIENT_CASES),
383
-  ...testSection(2, 'BQ-BRAIN-SCREEN', '数字畜牧可视化大屏合格性测试', SCREEN_CASES),
384
-  ...testSection(3, 'BQ-BRAIN-H5', '牧民综合服务移动端合格性测试', H5_CASES),
385
-  ...testSection(4, 'BQ-BRAIN-JY', '牦牛交易市场移动端合格性测试', JY_CASES),
386
-  ...testSection(5, 'BQ-SHOP-CLIENT', '农资商城后台合格性测试', SHOP_CLIENT_CASES),
387
-  ...testSection(6, 'BQ-SHOP-APP', '农资商城消费者端合格性测试', SHOP_APP_CASES),
388
-
389
-  h1('5  需求的可追踪性'),
390
-  p('a. 测试用例到需求的追踪:'),
391
-  tbl(['CSCI', '用例数', '需求/doc 引用', '说明'], [
392
-    ['BQ-BRAIN-CLIENT', '86', 'doc/各业务模块功能需求、REQ-CL-*', '第4.1章详述15条代表性用例,余见附录A'],
393
-    ['BQ-BRAIN-SCREEN', '32', 'ruoyi-screen/doc/、REQ-SC-*', '第4.2章详述8条,余见附录A'],
394
-    ['BQ-BRAIN-H5', '48', 'ruoyi-ui-app/doc/、REQ-H5-*', '第4.3章详述8条,余见附录A'],
395
-    ['BQ-BRAIN-JY', '38', 'doc/tradeMarket/、REQ-JY-*', '第4.4章详述7条,余见附录A'],
396
-    ['BQ-SHOP-CLIENT', '58', 'baqing-shop/doc/平台后台、店铺后台、REQ-SH-*', '第4.5章详述12条,余见附录A'],
397
-    ['BQ-SHOP-APP', '50', 'baqing-shop/doc/消费者端、REQ-AP-*', '第4.6章详述10条,余见附录A'],
398
-    ['合计', '312', '合同功能清单+SRS', '需求可追溯覆盖率100%'],
399
-  ]),
400
-  p('b. 需求到测试用例的追踪:合同功能清单及 SRS 中每一条功能需求,均至少对应附录 A 中一条测试用例;核心业务流程需求对应第 4 章代表性用例及测试过程步骤。跨系统 Open API 需求由 TC-SC-004 与 TC-SH-008 共同覆盖。'),
401
-
402
-  h1('6  注解'),
403
-  p('6.1  背景信息'),
404
-  p('本说明是巴青牧业大脑及巴青农资商城信息化建设项目竣工验收技术文档体系的重要组成部分,与 STP、STR 配套使用。测试执行结果记录于《软件测试报告(STR)》。'),
405
-  p('6.2  缩略语'),
406
-  tbl(['缩略语', '含义'], [
407
-    ['STD', 'Software Test Description,软件测试说明'],
408
-    ['STP', 'Software Test Plan,软件测试计划'],
409
-    ['STR', 'Software Test Report,软件测试报告'],
410
-    ['CSCI', 'Computer Software Configuration Item,计算机软件配置项'],
411
-    ['SRS', 'Software Requirements Specification,软件需求规格说明'],
412
-    ['RBAC', 'Role-Based Access Control,基于角色的访问控制'],
413
-    ['JWT', 'JSON Web Token,身份认证令牌'],
414
-    ['Open API', '对外数据开放接口'],
415
-    ['H5', 'HTML5 移动端 Web 应用'],
416
-  ]),
417
-
418
-  h1('附录 A  全部测试用例目录(312 条)'),
419
-  p('本附录列出全部 312 条测试用例目录。第 4 章已详述 60 条代表性用例的完整测试过程(含 4.x.y.1~4.x.y.7);其余用例参照对应模块功能需求文档及第 4 章同类用例模板执行。'),
420
-  ...(() => {
421
-    const chunks = [];
422
-    for (let i = 0; i < catalog.length; i += 78) {
423
-      const slice = catalog.slice(i, i + 78);
424
-      chunks.push(tbl(['用例编号', '用例名称', 'CSCI', '所属模块', '详细说明位置'], slice));
425
-      if (i + 78 < catalog.length) chunks.push(p(`(续表 ${Math.floor(i / 78) + 2})`));
426
-    }
427
-    return chunks;
428
-  })(),
429
-  tbl(['统计项', '数量'], [
430
-    ['用例总数', '312'],
431
-    ['第4章详述用例', '60'],
432
-    ['附录A扩展用例', '252'],
433
-    ['CSCI 数量', '6'],
434
-    ['业务模块数', '52'],
435
-    ['需求可追溯覆盖率', '100%'],
436
-  ]),
437
-
438
-  h1('附录 B  测试环境及账号清单'),
439
-  tbl(['子系统', '访问地址', '用户名', '密码', '角色'], [
440
-    ['牧业大脑-运营管理后台', ENV.brainClient, 'admin', 'admin123', '超级管理员'],
441
-    ['牧业大脑-可视化大屏', ENV.brainScreen, 'admin', 'admin123', '大屏管理员'],
442
-    ['牧业大脑-牧民综合服务H5', ENV.brainH5, 'ceshi3', '123456', '牧民用户'],
443
-    ['牧业大脑-交易市场H5', ENV.brainJy, 'gys0014', '123456', '供应商'],
444
-    ['牧业大脑-交易市场H5', ENV.brainJy, 'cxs0012', '123456', '承销商'],
445
-    ['农资商城-平台/店铺后台', ENV.shopClient, 'admin', 'admin123', '平台管理员'],
446
-    ['农资商城-消费者H5', ENV.shopH5, 'test', '123456', 'C端会员'],
447
-  ]),
448
-
449
-  p(''),
450
-  p('—— 文档结束 ——'),
451
-];
452
-
453
-const doc = new Document({
454
-  title: '巴青牧业大脑软件测试说明(STD)',
455
-  creator: '项目第三方测试组',
456
-  description: '巴青牧业大脑及巴青农资商城合格性测试说明',
457
-  sections: [{ properties: {}, children }],
458
-});
459
-
460
-const out = path.join(__dirname, '巴青牧业大脑软件测试说明(STD).docx');
461
-Packer.toBuffer(doc).then(buf => {
462
-  fs.writeFileSync(out, buf);
463
-  console.log('Generated:', out);
464
-  console.log('Catalog cases:', catalog.length);
465
-});

Разлика између датотеке није приказан због своје велике величине
+ 0 - 741
test/generate-stp.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 334
test/generate-str.js


+ 0 - 16
test/node_modules/.bin/nanoid

@@ -1,16 +0,0 @@
1
-#!/bin/sh
2
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
-case `uname` in
5
-    *CYGWIN*|*MINGW*|*MSYS*)
6
-        if command -v cygpath > /dev/null 2>&1; then
7
-            basedir=`cygpath -w "$basedir"`
8
-        fi
9
-    ;;
10
-esac
11
-
12
-if [ -x "$basedir/node" ]; then
13
-  exec "$basedir/node"  "$basedir/../nanoid/bin/nanoid.js" "$@"
14
-else 
15
-  exec node  "$basedir/../nanoid/bin/nanoid.js" "$@"
16
-fi

+ 0 - 17
test/node_modules/.bin/nanoid.cmd

@@ -1,17 +0,0 @@
1
-@ECHO off
2
-GOTO start
3
-:find_dp0
4
-SET dp0=%~dp0
5
-EXIT /b
6
-:start
7
-SETLOCAL
8
-CALL :find_dp0
9
-
10
-IF EXIST "%dp0%\node.exe" (
11
-  SET "_prog=%dp0%\node.exe"
12
-) ELSE (
13
-  SET "_prog=node"
14
-  SET PATHEXT=%PATHEXT:;.JS;=;%
15
-)
16
-
17
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\nanoid\bin\nanoid.js" %*

+ 0 - 28
test/node_modules/.bin/nanoid.ps1

@@ -1,28 +0,0 @@
1
-#!/usr/bin/env pwsh
2
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
-$exe=""
5
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
-  # Fix case when both the Windows and Linux builds of Node
7
-  # are installed in the same directory
8
-  $exe=".exe"
9
-}
10
-$ret=0
11
-if (Test-Path "$basedir/node$exe") {
12
-  # Support pipeline input
13
-  if ($MyInvocation.ExpectingInput) {
14
-    $input | & "$basedir/node$exe"  "$basedir/../nanoid/bin/nanoid.js" $args
15
-  } else {
16
-    & "$basedir/node$exe"  "$basedir/../nanoid/bin/nanoid.js" $args
17
-  }
18
-  $ret=$LASTEXITCODE
19
-} else {
20
-  # Support pipeline input
21
-  if ($MyInvocation.ExpectingInput) {
22
-    $input | & "node$exe"  "$basedir/../nanoid/bin/nanoid.js" $args
23
-  } else {
24
-    & "node$exe"  "$basedir/../nanoid/bin/nanoid.js" $args
25
-  }
26
-  $ret=$LASTEXITCODE
27
-}
28
-exit $ret

+ 0 - 16
test/node_modules/.bin/xml-js

@@ -1,16 +0,0 @@
1
-#!/bin/sh
2
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
-case `uname` in
5
-    *CYGWIN*|*MINGW*|*MSYS*)
6
-        if command -v cygpath > /dev/null 2>&1; then
7
-            basedir=`cygpath -w "$basedir"`
8
-        fi
9
-    ;;
10
-esac
11
-
12
-if [ -x "$basedir/node" ]; then
13
-  exec "$basedir/node"  "$basedir/../xml-js/bin/cli.js" "$@"
14
-else 
15
-  exec node  "$basedir/../xml-js/bin/cli.js" "$@"
16
-fi

+ 0 - 17
test/node_modules/.bin/xml-js.cmd

@@ -1,17 +0,0 @@
1
-@ECHO off
2
-GOTO start
3
-:find_dp0
4
-SET dp0=%~dp0
5
-EXIT /b
6
-:start
7
-SETLOCAL
8
-CALL :find_dp0
9
-
10
-IF EXIST "%dp0%\node.exe" (
11
-  SET "_prog=%dp0%\node.exe"
12
-) ELSE (
13
-  SET "_prog=node"
14
-  SET PATHEXT=%PATHEXT:;.JS;=;%
15
-)
16
-
17
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\xml-js\bin\cli.js" %*

+ 0 - 28
test/node_modules/.bin/xml-js.ps1

@@ -1,28 +0,0 @@
1
-#!/usr/bin/env pwsh
2
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
-$exe=""
5
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
-  # Fix case when both the Windows and Linux builds of Node
7
-  # are installed in the same directory
8
-  $exe=".exe"
9
-}
10
-$ret=0
11
-if (Test-Path "$basedir/node$exe") {
12
-  # Support pipeline input
13
-  if ($MyInvocation.ExpectingInput) {
14
-    $input | & "$basedir/node$exe"  "$basedir/../xml-js/bin/cli.js" $args
15
-  } else {
16
-    & "$basedir/node$exe"  "$basedir/../xml-js/bin/cli.js" $args
17
-  }
18
-  $ret=$LASTEXITCODE
19
-} else {
20
-  # Support pipeline input
21
-  if ($MyInvocation.ExpectingInput) {
22
-    $input | & "node$exe"  "$basedir/../xml-js/bin/cli.js" $args
23
-  } else {
24
-    & "node$exe"  "$basedir/../xml-js/bin/cli.js" $args
25
-  }
26
-  $ret=$LASTEXITCODE
27
-}
28
-exit $ret

+ 0 - 200
test/node_modules/.package-lock.json

@@ -1,200 +0,0 @@
1
-{
2
-  "name": "test",
3
-  "version": "1.0.0",
4
-  "lockfileVersion": 3,
5
-  "requires": true,
6
-  "packages": {
7
-    "node_modules/@types/node": {
8
-      "version": "25.9.2",
9
-      "resolved": "https://registry.npmmirror.com/@types/node/-/node-25.9.2.tgz",
10
-      "integrity": "sha512-G05zqtJhcDLb8uslf5EjCxXg9G1KQxiV8OS0R26IC//Eoyitzqe8z37I7cqvnZlrlSfgocQRfSn/AHBZJJFyGw==",
11
-      "license": "MIT",
12
-      "dependencies": {
13
-        "undici-types": ">=7.24.0 <7.24.7"
14
-      }
15
-    },
16
-    "node_modules/core-util-is": {
17
-      "version": "1.0.3",
18
-      "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
19
-      "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
20
-      "license": "MIT"
21
-    },
22
-    "node_modules/docx": {
23
-      "version": "9.7.1",
24
-      "resolved": "https://registry.npmmirror.com/docx/-/docx-9.7.1.tgz",
25
-      "integrity": "sha512-ilXFf9Moz47ABjFpDiA5s1w9lpb4EFSp7+5iiJSbfyYDM+bpZdAgLlSr7fW4aXhVe/E+F6QCv0EvRVFEd5CsWg==",
26
-      "license": "MIT",
27
-      "dependencies": {
28
-        "@types/node": "^25.2.3",
29
-        "hash.js": "^1.1.7",
30
-        "jszip": "^3.10.1",
31
-        "nanoid": "^5.1.3",
32
-        "xml": "^1.0.1",
33
-        "xml-js": "^1.6.8"
34
-      },
35
-      "engines": {
36
-        "node": ">=10"
37
-      }
38
-    },
39
-    "node_modules/hash.js": {
40
-      "version": "1.1.7",
41
-      "resolved": "https://registry.npmmirror.com/hash.js/-/hash.js-1.1.7.tgz",
42
-      "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
43
-      "license": "MIT",
44
-      "dependencies": {
45
-        "inherits": "^2.0.3",
46
-        "minimalistic-assert": "^1.0.1"
47
-      }
48
-    },
49
-    "node_modules/immediate": {
50
-      "version": "3.0.6",
51
-      "resolved": "https://registry.npmmirror.com/immediate/-/immediate-3.0.6.tgz",
52
-      "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
53
-      "license": "MIT"
54
-    },
55
-    "node_modules/inherits": {
56
-      "version": "2.0.4",
57
-      "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
58
-      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
59
-      "license": "ISC"
60
-    },
61
-    "node_modules/isarray": {
62
-      "version": "1.0.0",
63
-      "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz",
64
-      "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
65
-      "license": "MIT"
66
-    },
67
-    "node_modules/jszip": {
68
-      "version": "3.10.1",
69
-      "resolved": "https://registry.npmmirror.com/jszip/-/jszip-3.10.1.tgz",
70
-      "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
71
-      "license": "(MIT OR GPL-3.0-or-later)",
72
-      "dependencies": {
73
-        "lie": "~3.3.0",
74
-        "pako": "~1.0.2",
75
-        "readable-stream": "~2.3.6",
76
-        "setimmediate": "^1.0.5"
77
-      }
78
-    },
79
-    "node_modules/lie": {
80
-      "version": "3.3.0",
81
-      "resolved": "https://registry.npmmirror.com/lie/-/lie-3.3.0.tgz",
82
-      "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==",
83
-      "license": "MIT",
84
-      "dependencies": {
85
-        "immediate": "~3.0.5"
86
-      }
87
-    },
88
-    "node_modules/minimalistic-assert": {
89
-      "version": "1.0.1",
90
-      "resolved": "https://registry.npmmirror.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
91
-      "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
92
-      "license": "ISC"
93
-    },
94
-    "node_modules/nanoid": {
95
-      "version": "5.1.11",
96
-      "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-5.1.11.tgz",
97
-      "integrity": "sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg==",
98
-      "funding": [
99
-        {
100
-          "type": "github",
101
-          "url": "https://github.com/sponsors/ai"
102
-        }
103
-      ],
104
-      "license": "MIT",
105
-      "bin": {
106
-        "nanoid": "bin/nanoid.js"
107
-      },
108
-      "engines": {
109
-        "node": "^18 || >=20"
110
-      }
111
-    },
112
-    "node_modules/pako": {
113
-      "version": "1.0.11",
114
-      "resolved": "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz",
115
-      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
116
-      "license": "(MIT AND Zlib)"
117
-    },
118
-    "node_modules/process-nextick-args": {
119
-      "version": "2.0.1",
120
-      "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
121
-      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
122
-      "license": "MIT"
123
-    },
124
-    "node_modules/readable-stream": {
125
-      "version": "2.3.8",
126
-      "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz",
127
-      "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
128
-      "license": "MIT",
129
-      "dependencies": {
130
-        "core-util-is": "~1.0.0",
131
-        "inherits": "~2.0.3",
132
-        "isarray": "~1.0.0",
133
-        "process-nextick-args": "~2.0.0",
134
-        "safe-buffer": "~5.1.1",
135
-        "string_decoder": "~1.1.1",
136
-        "util-deprecate": "~1.0.1"
137
-      }
138
-    },
139
-    "node_modules/safe-buffer": {
140
-      "version": "5.1.2",
141
-      "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz",
142
-      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
143
-      "license": "MIT"
144
-    },
145
-    "node_modules/sax": {
146
-      "version": "1.6.0",
147
-      "resolved": "https://registry.npmmirror.com/sax/-/sax-1.6.0.tgz",
148
-      "integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==",
149
-      "license": "BlueOak-1.0.0",
150
-      "engines": {
151
-        "node": ">=11.0.0"
152
-      }
153
-    },
154
-    "node_modules/setimmediate": {
155
-      "version": "1.0.5",
156
-      "resolved": "https://registry.npmmirror.com/setimmediate/-/setimmediate-1.0.5.tgz",
157
-      "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
158
-      "license": "MIT"
159
-    },
160
-    "node_modules/string_decoder": {
161
-      "version": "1.1.1",
162
-      "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
163
-      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
164
-      "license": "MIT",
165
-      "dependencies": {
166
-        "safe-buffer": "~5.1.0"
167
-      }
168
-    },
169
-    "node_modules/undici-types": {
170
-      "version": "7.24.6",
171
-      "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-7.24.6.tgz",
172
-      "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
173
-      "license": "MIT"
174
-    },
175
-    "node_modules/util-deprecate": {
176
-      "version": "1.0.2",
177
-      "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
178
-      "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
179
-      "license": "MIT"
180
-    },
181
-    "node_modules/xml": {
182
-      "version": "1.0.1",
183
-      "resolved": "https://registry.npmmirror.com/xml/-/xml-1.0.1.tgz",
184
-      "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==",
185
-      "license": "MIT"
186
-    },
187
-    "node_modules/xml-js": {
188
-      "version": "1.6.11",
189
-      "resolved": "https://registry.npmmirror.com/xml-js/-/xml-js-1.6.11.tgz",
190
-      "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==",
191
-      "license": "MIT",
192
-      "dependencies": {
193
-        "sax": "^1.2.4"
194
-      },
195
-      "bin": {
196
-        "xml-js": "bin/cli.js"
197
-      }
198
-    }
199
-  }
200
-}

+ 0 - 21
test/node_modules/@types/node/LICENSE

@@ -1,21 +0,0 @@
1
-    MIT License
2
-
3
-    Copyright (c) Microsoft Corporation.
4
-
5
-    Permission is hereby granted, free of charge, to any person obtaining a copy
6
-    of this software and associated documentation files (the "Software"), to deal
7
-    in the Software without restriction, including without limitation the rights
8
-    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-    copies of the Software, and to permit persons to whom the Software is
10
-    furnished to do so, subject to the following conditions:
11
-
12
-    The above copyright notice and this permission notice shall be included in all
13
-    copies or substantial portions of the Software.
14
-
15
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-    SOFTWARE

Разлика између датотеке није приказан због своје велике величине
+ 0 - 15
test/node_modules/@types/node/README.md


+ 0 - 950
test/node_modules/@types/node/assert.d.ts

@@ -1,950 +0,0 @@
1
-declare module "node:assert" {
2
-    import strict = require("node:assert/strict");
3
-    /**
4
-     * An alias of {@link assert.ok}.
5
-     * @since v0.5.9
6
-     * @param value The input that is checked for being truthy.
7
-     */
8
-    function assert(value: unknown, message?: string | Error): asserts value;
9
-    const kOptions: unique symbol;
10
-    namespace assert {
11
-        type AssertMethodNames =
12
-            | "deepEqual"
13
-            | "deepStrictEqual"
14
-            | "doesNotMatch"
15
-            | "doesNotReject"
16
-            | "doesNotThrow"
17
-            | "equal"
18
-            | "fail"
19
-            | "ifError"
20
-            | "match"
21
-            | "notDeepEqual"
22
-            | "notDeepStrictEqual"
23
-            | "notEqual"
24
-            | "notStrictEqual"
25
-            | "ok"
26
-            | "partialDeepStrictEqual"
27
-            | "rejects"
28
-            | "strictEqual"
29
-            | "throws";
30
-        interface AssertOptions {
31
-            /**
32
-             * If set to `'full'`, shows the full diff in assertion errors.
33
-             * @default 'simple'
34
-             */
35
-            diff?: "simple" | "full" | undefined;
36
-            /**
37
-             * If set to `true`, non-strict methods behave like their
38
-             * corresponding strict methods.
39
-             * @default true
40
-             */
41
-            strict?: boolean | undefined;
42
-            /**
43
-             * If set to `true`, skips prototype and constructor
44
-             * comparison in deep equality checks.
45
-             * @since v24.9.0
46
-             * @default false
47
-             */
48
-            skipPrototype?: boolean | undefined;
49
-        }
50
-        interface Assert extends Pick<typeof assert, AssertMethodNames> {
51
-            readonly [kOptions]: AssertOptions & { strict: false };
52
-        }
53
-        interface AssertStrict extends Pick<typeof strict, AssertMethodNames> {
54
-            readonly [kOptions]: AssertOptions & { strict: true };
55
-        }
56
-        /**
57
-         * The `Assert` class allows creating independent assertion instances with custom options.
58
-         * @since v24.6.0
59
-         */
60
-        var Assert: {
61
-            /**
62
-             * Creates a new assertion instance. The `diff` option controls the verbosity of diffs in assertion error messages.
63
-             *
64
-             * ```js
65
-             * const { Assert } = require('node:assert');
66
-             * const assertInstance = new Assert({ diff: 'full' });
67
-             * assertInstance.deepStrictEqual({ a: 1 }, { a: 2 });
68
-             * // Shows a full diff in the error message.
69
-             * ```
70
-             *
71
-             * **Important**: When destructuring assertion methods from an `Assert` instance,
72
-             * the methods lose their connection to the instance's configuration options (such
73
-             * as `diff`, `strict`, and `skipPrototype` settings).
74
-             * The destructured methods will fall back to default behavior instead.
75
-             *
76
-             * ```js
77
-             * const myAssert = new Assert({ diff: 'full' });
78
-             *
79
-             * // This works as expected - uses 'full' diff
80
-             * myAssert.strictEqual({ a: 1 }, { b: { c: 1 } });
81
-             *
82
-             * // This loses the 'full' diff setting - falls back to default 'simple' diff
83
-             * const { strictEqual } = myAssert;
84
-             * strictEqual({ a: 1 }, { b: { c: 1 } });
85
-             * ```
86
-             *
87
-             * The `skipPrototype` option affects all deep equality methods:
88
-             *
89
-             * ```js
90
-             * class Foo {
91
-             *   constructor(a) {
92
-             *     this.a = a;
93
-             *   }
94
-             * }
95
-             *
96
-             * class Bar {
97
-             *   constructor(a) {
98
-             *     this.a = a;
99
-             *   }
100
-             * }
101
-             *
102
-             * const foo = new Foo(1);
103
-             * const bar = new Bar(1);
104
-             *
105
-             * // Default behavior - fails due to different constructors
106
-             * const assert1 = new Assert();
107
-             * assert1.deepStrictEqual(foo, bar); // AssertionError
108
-             *
109
-             * // Skip prototype comparison - passes if properties are equal
110
-             * const assert2 = new Assert({ skipPrototype: true });
111
-             * assert2.deepStrictEqual(foo, bar); // OK
112
-             * ```
113
-             *
114
-             * When destructured, methods lose access to the instance's `this` context and revert to default assertion behavior
115
-             * (diff: 'simple', non-strict mode).
116
-             * To maintain custom options when using destructured methods, avoid
117
-             * destructuring and call methods directly on the instance.
118
-             * @since v24.6.0
119
-             */
120
-            new(
121
-                options?: AssertOptions & { strict?: true | undefined },
122
-            ): AssertStrict;
123
-            new(
124
-                options: AssertOptions,
125
-            ): Assert;
126
-        };
127
-        interface AssertionErrorOptions {
128
-            /**
129
-             * If provided, the error message is set to this value.
130
-             */
131
-            message?: string | undefined;
132
-            /**
133
-             * The `actual` property on the error instance.
134
-             */
135
-            actual?: unknown;
136
-            /**
137
-             * The `expected` property on the error instance.
138
-             */
139
-            expected?: unknown;
140
-            /**
141
-             * The `operator` property on the error instance.
142
-             */
143
-            operator?: string | undefined;
144
-            /**
145
-             * If provided, the generated stack trace omits frames before this function.
146
-             */
147
-            stackStartFn?: Function | undefined;
148
-            /**
149
-             * If set to `'full'`, shows the full diff in assertion errors.
150
-             * @default 'simple'
151
-             */
152
-            diff?: "simple" | "full" | undefined;
153
-        }
154
-        /**
155
-         * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class.
156
-         */
157
-        class AssertionError extends Error {
158
-            constructor(options: AssertionErrorOptions);
159
-            /**
160
-             * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
161
-             */
162
-            actual: unknown;
163
-            /**
164
-             * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
165
-             */
166
-            expected: unknown;
167
-            /**
168
-             * Indicates if the message was auto-generated (`true`) or not.
169
-             */
170
-            generatedMessage: boolean;
171
-            /**
172
-             * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
173
-             */
174
-            code: "ERR_ASSERTION";
175
-            /**
176
-             * Set to the passed in operator value.
177
-             */
178
-            operator: string;
179
-        }
180
-        type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
181
-        /**
182
-         * Throws an `AssertionError` with the provided error message or a default
183
-         * error message. If the `message` parameter is an instance of an `Error` then
184
-         * it will be thrown instead of the `AssertionError`.
185
-         *
186
-         * ```js
187
-         * import assert from 'node:assert/strict';
188
-         *
189
-         * assert.fail();
190
-         * // AssertionError [ERR_ASSERTION]: Failed
191
-         *
192
-         * assert.fail('boom');
193
-         * // AssertionError [ERR_ASSERTION]: boom
194
-         *
195
-         * assert.fail(new TypeError('need array'));
196
-         * // TypeError: need array
197
-         * ```
198
-         * @since v0.1.21
199
-         * @param [message='Failed']
200
-         */
201
-        function fail(message?: string | Error): never;
202
-        /**
203
-         * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
204
-         *
205
-         * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default
206
-         * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
207
-         * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
208
-         *
209
-         * Be aware that in the `repl` the error message will be different to the one
210
-         * thrown in a file! See below for further details.
211
-         *
212
-         * ```js
213
-         * import assert from 'node:assert/strict';
214
-         *
215
-         * assert.ok(true);
216
-         * // OK
217
-         * assert.ok(1);
218
-         * // OK
219
-         *
220
-         * assert.ok();
221
-         * // AssertionError: No value argument passed to `assert.ok()`
222
-         *
223
-         * assert.ok(false, 'it\'s false');
224
-         * // AssertionError: it's false
225
-         *
226
-         * // In the repl:
227
-         * assert.ok(typeof 123 === 'string');
228
-         * // AssertionError: false == true
229
-         *
230
-         * // In a file (e.g. test.js):
231
-         * assert.ok(typeof 123 === 'string');
232
-         * // AssertionError: The expression evaluated to a falsy value:
233
-         * //
234
-         * //   assert.ok(typeof 123 === 'string')
235
-         *
236
-         * assert.ok(false);
237
-         * // AssertionError: The expression evaluated to a falsy value:
238
-         * //
239
-         * //   assert.ok(false)
240
-         *
241
-         * assert.ok(0);
242
-         * // AssertionError: The expression evaluated to a falsy value:
243
-         * //
244
-         * //   assert.ok(0)
245
-         * ```
246
-         *
247
-         * ```js
248
-         * import assert from 'node:assert/strict';
249
-         *
250
-         * // Using `assert()` works the same:
251
-         * assert(2 + 2 > 5);;
252
-         * // AssertionError: The expression evaluated to a falsy value:
253
-         * //
254
-         * //   assert(2 + 2 > 5)
255
-         * ```
256
-         * @since v0.1.21
257
-         */
258
-        function ok(value: unknown, message?: string | Error): asserts value;
259
-        /**
260
-         * **Strict assertion mode**
261
-         *
262
-         * An alias of {@link strictEqual}.
263
-         *
264
-         * **Legacy assertion mode**
265
-         *
266
-         * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
267
-         *
268
-         * Tests shallow, coercive equality between the `actual` and `expected` parameters
269
-         * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
270
-         * and treated as being identical if both sides are `NaN`.
271
-         *
272
-         * ```js
273
-         * import assert from 'node:assert';
274
-         *
275
-         * assert.equal(1, 1);
276
-         * // OK, 1 == 1
277
-         * assert.equal(1, '1');
278
-         * // OK, 1 == '1'
279
-         * assert.equal(NaN, NaN);
280
-         * // OK
281
-         *
282
-         * assert.equal(1, 2);
283
-         * // AssertionError: 1 == 2
284
-         * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
285
-         * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
286
-         * ```
287
-         *
288
-         * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
289
-         * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
290
-         * @since v0.1.21
291
-         */
292
-        function equal(actual: unknown, expected: unknown, message?: string | Error): void;
293
-        /**
294
-         * **Strict assertion mode**
295
-         *
296
-         * An alias of {@link notStrictEqual}.
297
-         *
298
-         * **Legacy assertion mode**
299
-         *
300
-         * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
301
-         *
302
-         * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
303
-         * specially handled and treated as being identical if both sides are `NaN`.
304
-         *
305
-         * ```js
306
-         * import assert from 'node:assert';
307
-         *
308
-         * assert.notEqual(1, 2);
309
-         * // OK
310
-         *
311
-         * assert.notEqual(1, 1);
312
-         * // AssertionError: 1 != 1
313
-         *
314
-         * assert.notEqual(1, '1');
315
-         * // AssertionError: 1 != '1'
316
-         * ```
317
-         *
318
-         * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error
319
-         * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
320
-         * @since v0.1.21
321
-         */
322
-        function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
323
-        /**
324
-         * **Strict assertion mode**
325
-         *
326
-         * An alias of {@link deepStrictEqual}.
327
-         *
328
-         * **Legacy assertion mode**
329
-         *
330
-         * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
331
-         *
332
-         * Tests for deep equality between the `actual` and `expected` parameters. Consider
333
-         * using {@link deepStrictEqual} instead. {@link deepEqual} can have
334
-         * surprising results.
335
-         *
336
-         * _Deep equality_ means that the enumerable "own" properties of child objects
337
-         * are also recursively evaluated by the following rules.
338
-         * @since v0.1.21
339
-         */
340
-        function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
341
-        /**
342
-         * **Strict assertion mode**
343
-         *
344
-         * An alias of {@link notDeepStrictEqual}.
345
-         *
346
-         * **Legacy assertion mode**
347
-         *
348
-         * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
349
-         *
350
-         * Tests for any deep inequality. Opposite of {@link deepEqual}.
351
-         *
352
-         * ```js
353
-         * import assert from 'node:assert';
354
-         *
355
-         * const obj1 = {
356
-         *   a: {
357
-         *     b: 1,
358
-         *   },
359
-         * };
360
-         * const obj2 = {
361
-         *   a: {
362
-         *     b: 2,
363
-         *   },
364
-         * };
365
-         * const obj3 = {
366
-         *   a: {
367
-         *     b: 1,
368
-         *   },
369
-         * };
370
-         * const obj4 = { __proto__: obj1 };
371
-         *
372
-         * assert.notDeepEqual(obj1, obj1);
373
-         * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
374
-         *
375
-         * assert.notDeepEqual(obj1, obj2);
376
-         * // OK
377
-         *
378
-         * assert.notDeepEqual(obj1, obj3);
379
-         * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
380
-         *
381
-         * assert.notDeepEqual(obj1, obj4);
382
-         * // OK
383
-         * ```
384
-         *
385
-         * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
386
-         * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
387
-         * instead of the `AssertionError`.
388
-         * @since v0.1.21
389
-         */
390
-        function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
391
-        /**
392
-         * Tests strict equality between the `actual` and `expected` parameters as
393
-         * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
394
-         *
395
-         * ```js
396
-         * import assert from 'node:assert/strict';
397
-         *
398
-         * assert.strictEqual(1, 2);
399
-         * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
400
-         * //
401
-         * // 1 !== 2
402
-         *
403
-         * assert.strictEqual(1, 1);
404
-         * // OK
405
-         *
406
-         * assert.strictEqual('Hello foobar', 'Hello World!');
407
-         * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
408
-         * // + actual - expected
409
-         * //
410
-         * // + 'Hello foobar'
411
-         * // - 'Hello World!'
412
-         * //          ^
413
-         *
414
-         * const apples = 1;
415
-         * const oranges = 2;
416
-         * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
417
-         * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
418
-         *
419
-         * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
420
-         * // TypeError: Inputs are not identical
421
-         * ```
422
-         *
423
-         * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
424
-         * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
425
-         * instead of the `AssertionError`.
426
-         * @since v0.1.21
427
-         */
428
-        function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
429
-        /**
430
-         * Tests strict inequality between the `actual` and `expected` parameters as
431
-         * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
432
-         *
433
-         * ```js
434
-         * import assert from 'node:assert/strict';
435
-         *
436
-         * assert.notStrictEqual(1, 2);
437
-         * // OK
438
-         *
439
-         * assert.notStrictEqual(1, 1);
440
-         * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
441
-         * //
442
-         * // 1
443
-         *
444
-         * assert.notStrictEqual(1, '1');
445
-         * // OK
446
-         * ```
447
-         *
448
-         * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
449
-         * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
450
-         * instead of the `AssertionError`.
451
-         * @since v0.1.21
452
-         */
453
-        function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
454
-        /**
455
-         * Tests for deep equality between the `actual` and `expected` parameters.
456
-         * "Deep" equality means that the enumerable "own" properties of child objects
457
-         * are recursively evaluated also by the following rules.
458
-         * @since v1.2.0
459
-         */
460
-        function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
461
-        /**
462
-         * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
463
-         *
464
-         * ```js
465
-         * import assert from 'node:assert/strict';
466
-         *
467
-         * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
468
-         * // OK
469
-         * ```
470
-         *
471
-         * If the values are deeply and strictly equal, an `AssertionError` is thrown
472
-         * with a `message` property set equal to the value of the `message` parameter. If
473
-         * the `message` parameter is undefined, a default error message is assigned. If
474
-         * the `message` parameter is an instance of an `Error` then it will be thrown
475
-         * instead of the `AssertionError`.
476
-         * @since v1.2.0
477
-         */
478
-        function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
479
-        /**
480
-         * Expects the function `fn` to throw an error.
481
-         *
482
-         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
483
-         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
484
-         * a validation object where each property will be tested for strict deep equality,
485
-         * or an instance of error where each property will be tested for strict deep
486
-         * equality including the non-enumerable `message` and `name` properties. When
487
-         * using an object, it is also possible to use a regular expression, when
488
-         * validating against a string property. See below for examples.
489
-         *
490
-         * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
491
-         * fails.
492
-         *
493
-         * Custom validation object/error instance:
494
-         *
495
-         * ```js
496
-         * import assert from 'node:assert/strict';
497
-         *
498
-         * const err = new TypeError('Wrong value');
499
-         * err.code = 404;
500
-         * err.foo = 'bar';
501
-         * err.info = {
502
-         *   nested: true,
503
-         *   baz: 'text',
504
-         * };
505
-         * err.reg = /abc/i;
506
-         *
507
-         * assert.throws(
508
-         *   () => {
509
-         *     throw err;
510
-         *   },
511
-         *   {
512
-         *     name: 'TypeError',
513
-         *     message: 'Wrong value',
514
-         *     info: {
515
-         *       nested: true,
516
-         *       baz: 'text',
517
-         *     },
518
-         *     // Only properties on the validation object will be tested for.
519
-         *     // Using nested objects requires all properties to be present. Otherwise
520
-         *     // the validation is going to fail.
521
-         *   },
522
-         * );
523
-         *
524
-         * // Using regular expressions to validate error properties:
525
-         * assert.throws(
526
-         *   () => {
527
-         *     throw err;
528
-         *   },
529
-         *   {
530
-         *     // The `name` and `message` properties are strings and using regular
531
-         *     // expressions on those will match against the string. If they fail, an
532
-         *     // error is thrown.
533
-         *     name: /^TypeError$/,
534
-         *     message: /Wrong/,
535
-         *     foo: 'bar',
536
-         *     info: {
537
-         *       nested: true,
538
-         *       // It is not possible to use regular expressions for nested properties!
539
-         *       baz: 'text',
540
-         *     },
541
-         *     // The `reg` property contains a regular expression and only if the
542
-         *     // validation object contains an identical regular expression, it is going
543
-         *     // to pass.
544
-         *     reg: /abc/i,
545
-         *   },
546
-         * );
547
-         *
548
-         * // Fails due to the different `message` and `name` properties:
549
-         * assert.throws(
550
-         *   () => {
551
-         *     const otherErr = new Error('Not found');
552
-         *     // Copy all enumerable properties from `err` to `otherErr`.
553
-         *     for (const [key, value] of Object.entries(err)) {
554
-         *       otherErr[key] = value;
555
-         *     }
556
-         *     throw otherErr;
557
-         *   },
558
-         *   // The error's `message` and `name` properties will also be checked when using
559
-         *   // an error as validation object.
560
-         *   err,
561
-         * );
562
-         * ```
563
-         *
564
-         * Validate instanceof using constructor:
565
-         *
566
-         * ```js
567
-         * import assert from 'node:assert/strict';
568
-         *
569
-         * assert.throws(
570
-         *   () => {
571
-         *     throw new Error('Wrong value');
572
-         *   },
573
-         *   Error,
574
-         * );
575
-         * ```
576
-         *
577
-         * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
578
-         *
579
-         * Using a regular expression runs `.toString` on the error object, and will
580
-         * therefore also include the error name.
581
-         *
582
-         * ```js
583
-         * import assert from 'node:assert/strict';
584
-         *
585
-         * assert.throws(
586
-         *   () => {
587
-         *     throw new Error('Wrong value');
588
-         *   },
589
-         *   /^Error: Wrong value$/,
590
-         * );
591
-         * ```
592
-         *
593
-         * Custom error validation:
594
-         *
595
-         * The function must return `true` to indicate all internal validations passed.
596
-         * It will otherwise fail with an `AssertionError`.
597
-         *
598
-         * ```js
599
-         * import assert from 'node:assert/strict';
600
-         *
601
-         * assert.throws(
602
-         *   () => {
603
-         *     throw new Error('Wrong value');
604
-         *   },
605
-         *   (err) => {
606
-         *     assert(err instanceof Error);
607
-         *     assert(/value/.test(err));
608
-         *     // Avoid returning anything from validation functions besides `true`.
609
-         *     // Otherwise, it's not clear what part of the validation failed. Instead,
610
-         *     // throw an error about the specific validation that failed (as done in this
611
-         *     // example) and add as much helpful debugging information to that error as
612
-         *     // possible.
613
-         *     return true;
614
-         *   },
615
-         *   'unexpected error',
616
-         * );
617
-         * ```
618
-         *
619
-         * `error` cannot be a string. If a string is provided as the second
620
-         * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
621
-         * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
622
-         * a string as the second argument gets considered:
623
-         *
624
-         * ```js
625
-         * import assert from 'node:assert/strict';
626
-         *
627
-         * function throwingFirst() {
628
-         *   throw new Error('First');
629
-         * }
630
-         *
631
-         * function throwingSecond() {
632
-         *   throw new Error('Second');
633
-         * }
634
-         *
635
-         * function notThrowing() {}
636
-         *
637
-         * // The second argument is a string and the input function threw an Error.
638
-         * // The first case will not throw as it does not match for the error message
639
-         * // thrown by the input function!
640
-         * assert.throws(throwingFirst, 'Second');
641
-         * // In the next example the message has no benefit over the message from the
642
-         * // error and since it is not clear if the user intended to actually match
643
-         * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
644
-         * assert.throws(throwingSecond, 'Second');
645
-         * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
646
-         *
647
-         * // The string is only used (as message) in case the function does not throw:
648
-         * assert.throws(notThrowing, 'Second');
649
-         * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
650
-         *
651
-         * // If it was intended to match for the error message do this instead:
652
-         * // It does not throw because the error messages match.
653
-         * assert.throws(throwingSecond, /Second$/);
654
-         *
655
-         * // If the error message does not match, an AssertionError is thrown.
656
-         * assert.throws(throwingFirst, /Second$/);
657
-         * // AssertionError [ERR_ASSERTION]
658
-         * ```
659
-         *
660
-         * Due to the confusing error-prone notation, avoid a string as the second
661
-         * argument.
662
-         * @since v0.1.21
663
-         */
664
-        function throws(block: () => unknown, message?: string | Error): void;
665
-        function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
666
-        /**
667
-         * Asserts that the function `fn` does not throw an error.
668
-         *
669
-         * Using `assert.doesNotThrow()` is actually not useful because there
670
-         * is no benefit in catching an error and then rethrowing it. Instead, consider
671
-         * adding a comment next to the specific code path that should not throw and keep
672
-         * error messages as expressive as possible.
673
-         *
674
-         * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
675
-         *
676
-         * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
677
-         * different type, or if the `error` parameter is undefined, the error is
678
-         * propagated back to the caller.
679
-         *
680
-         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
681
-         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
682
-         * function. See {@link throws} for more details.
683
-         *
684
-         * The following, for instance, will throw the `TypeError` because there is no
685
-         * matching error type in the assertion:
686
-         *
687
-         * ```js
688
-         * import assert from 'node:assert/strict';
689
-         *
690
-         * assert.doesNotThrow(
691
-         *   () => {
692
-         *     throw new TypeError('Wrong value');
693
-         *   },
694
-         *   SyntaxError,
695
-         * );
696
-         * ```
697
-         *
698
-         * However, the following will result in an `AssertionError` with the message
699
-         * 'Got unwanted exception...':
700
-         *
701
-         * ```js
702
-         * import assert from 'node:assert/strict';
703
-         *
704
-         * assert.doesNotThrow(
705
-         *   () => {
706
-         *     throw new TypeError('Wrong value');
707
-         *   },
708
-         *   TypeError,
709
-         * );
710
-         * ```
711
-         *
712
-         * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
713
-         *
714
-         * ```js
715
-         * import assert from 'node:assert/strict';
716
-         *
717
-         * assert.doesNotThrow(
718
-         *   () => {
719
-         *     throw new TypeError('Wrong value');
720
-         *   },
721
-         *   /Wrong value/,
722
-         *   'Whoops',
723
-         * );
724
-         * // Throws: AssertionError: Got unwanted exception: Whoops
725
-         * ```
726
-         * @since v0.1.21
727
-         */
728
-        function doesNotThrow(block: () => unknown, message?: string | Error): void;
729
-        function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
730
-        /**
731
-         * Throws `value` if `value` is not `undefined` or `null`. This is useful when
732
-         * testing the `error` argument in callbacks. The stack trace contains all frames
733
-         * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
734
-         *
735
-         * ```js
736
-         * import assert from 'node:assert/strict';
737
-         *
738
-         * assert.ifError(null);
739
-         * // OK
740
-         * assert.ifError(0);
741
-         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
742
-         * assert.ifError('error');
743
-         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
744
-         * assert.ifError(new Error());
745
-         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
746
-         *
747
-         * // Create some random error frames.
748
-         * let err;
749
-         * (function errorFrame() {
750
-         *   err = new Error('test error');
751
-         * })();
752
-         *
753
-         * (function ifErrorFrame() {
754
-         *   assert.ifError(err);
755
-         * })();
756
-         * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
757
-         * //     at ifErrorFrame
758
-         * //     at errorFrame
759
-         * ```
760
-         * @since v0.1.97
761
-         */
762
-        function ifError(value: unknown): asserts value is null | undefined;
763
-        /**
764
-         * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
765
-         * calls the function and awaits the returned promise to complete. It will then
766
-         * check that the promise is rejected.
767
-         *
768
-         * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
769
-         * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value)
770
-         * error. In both cases the error handler is skipped.
771
-         *
772
-         * Besides the async nature to await the completion behaves identically to {@link throws}.
773
-         *
774
-         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
775
-         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
776
-         * an object where each property will be tested for, or an instance of error where
777
-         * each property will be tested for including the non-enumerable `message` and `name` properties.
778
-         *
779
-         * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject.
780
-         *
781
-         * ```js
782
-         * import assert from 'node:assert/strict';
783
-         *
784
-         * await assert.rejects(
785
-         *   async () => {
786
-         *     throw new TypeError('Wrong value');
787
-         *   },
788
-         *   {
789
-         *     name: 'TypeError',
790
-         *     message: 'Wrong value',
791
-         *   },
792
-         * );
793
-         * ```
794
-         *
795
-         * ```js
796
-         * import assert from 'node:assert/strict';
797
-         *
798
-         * await assert.rejects(
799
-         *   async () => {
800
-         *     throw new TypeError('Wrong value');
801
-         *   },
802
-         *   (err) => {
803
-         *     assert.strictEqual(err.name, 'TypeError');
804
-         *     assert.strictEqual(err.message, 'Wrong value');
805
-         *     return true;
806
-         *   },
807
-         * );
808
-         * ```
809
-         *
810
-         * ```js
811
-         * import assert from 'node:assert/strict';
812
-         *
813
-         * assert.rejects(
814
-         *   Promise.reject(new Error('Wrong value')),
815
-         *   Error,
816
-         * ).then(() => {
817
-         *   // ...
818
-         * });
819
-         * ```
820
-         *
821
-         * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to
822
-         * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the
823
-         * example in {@link throws} carefully if using a string as the second argument gets considered.
824
-         * @since v10.0.0
825
-         */
826
-        function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
827
-        function rejects(
828
-            block: (() => Promise<unknown>) | Promise<unknown>,
829
-            error: AssertPredicate,
830
-            message?: string | Error,
831
-        ): Promise<void>;
832
-        /**
833
-         * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
834
-         * calls the function and awaits the returned promise to complete. It will then
835
-         * check that the promise is not rejected.
836
-         *
837
-         * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
838
-         * the function does not return a promise, `assert.doesNotReject()` will return a
839
-         * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases
840
-         * the error handler is skipped.
841
-         *
842
-         * Using `assert.doesNotReject()` is actually not useful because there is little
843
-         * benefit in catching a rejection and then rejecting it again. Instead, consider
844
-         * adding a comment next to the specific code path that should not reject and keep
845
-         * error messages as expressive as possible.
846
-         *
847
-         * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
848
-         * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
849
-         * function. See {@link throws} for more details.
850
-         *
851
-         * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
852
-         *
853
-         * ```js
854
-         * import assert from 'node:assert/strict';
855
-         *
856
-         * await assert.doesNotReject(
857
-         *   async () => {
858
-         *     throw new TypeError('Wrong value');
859
-         *   },
860
-         *   SyntaxError,
861
-         * );
862
-         * ```
863
-         *
864
-         * ```js
865
-         * import assert from 'node:assert/strict';
866
-         *
867
-         * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
868
-         *   .then(() => {
869
-         *     // ...
870
-         *   });
871
-         * ```
872
-         * @since v10.0.0
873
-         */
874
-        function doesNotReject(
875
-            block: (() => Promise<unknown>) | Promise<unknown>,
876
-            message?: string | Error,
877
-        ): Promise<void>;
878
-        function doesNotReject(
879
-            block: (() => Promise<unknown>) | Promise<unknown>,
880
-            error: AssertPredicate,
881
-            message?: string | Error,
882
-        ): Promise<void>;
883
-        /**
884
-         * Expects the `string` input to match the regular expression.
885
-         *
886
-         * ```js
887
-         * import assert from 'node:assert/strict';
888
-         *
889
-         * assert.match('I will fail', /pass/);
890
-         * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
891
-         *
892
-         * assert.match(123, /pass/);
893
-         * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
894
-         *
895
-         * assert.match('I will pass', /pass/);
896
-         * // OK
897
-         * ```
898
-         *
899
-         * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
900
-         * to the value of the `message` parameter. If the `message` parameter is
901
-         * undefined, a default error message is assigned. If the `message` parameter is an
902
-         * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
903
-         * @since v13.6.0, v12.16.0
904
-         */
905
-        function match(value: string, regExp: RegExp, message?: string | Error): void;
906
-        /**
907
-         * Expects the `string` input not to match the regular expression.
908
-         *
909
-         * ```js
910
-         * import assert from 'node:assert/strict';
911
-         *
912
-         * assert.doesNotMatch('I will fail', /fail/);
913
-         * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
914
-         *
915
-         * assert.doesNotMatch(123, /pass/);
916
-         * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
917
-         *
918
-         * assert.doesNotMatch('I will pass', /different/);
919
-         * // OK
920
-         * ```
921
-         *
922
-         * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
923
-         * to the value of the `message` parameter. If the `message` parameter is
924
-         * undefined, a default error message is assigned. If the `message` parameter is an
925
-         * instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
926
-         * @since v13.6.0, v12.16.0
927
-         */
928
-        function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
929
-        /**
930
-         * Tests for partial deep equality between the `actual` and `expected` parameters.
931
-         * "Deep" equality means that the enumerable "own" properties of child objects
932
-         * are recursively evaluated also by the following rules. "Partial" equality means
933
-         * that only properties that exist on the `expected` parameter are going to be
934
-         * compared.
935
-         *
936
-         * This method always passes the same test cases as `assert.deepStrictEqual()`,
937
-         * behaving as a super set of it.
938
-         * @since v22.13.0
939
-         */
940
-        function partialDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
941
-    }
942
-    namespace assert {
943
-        export { strict };
944
-    }
945
-    export = assert;
946
-}
947
-declare module "assert" {
948
-    import assert = require("node:assert");
949
-    export = assert;
950
-}

+ 0 - 59
test/node_modules/@types/node/assert/strict.d.ts

@@ -1,59 +0,0 @@
1
-declare module "node:assert/strict" {
2
-    import {
3
-        Assert,
4
-        AssertionError,
5
-        AssertionErrorOptions,
6
-        AssertOptions,
7
-        AssertPredicate,
8
-        AssertStrict,
9
-        deepStrictEqual,
10
-        doesNotMatch,
11
-        doesNotReject,
12
-        doesNotThrow,
13
-        fail,
14
-        ifError,
15
-        match,
16
-        notDeepStrictEqual,
17
-        notStrictEqual,
18
-        ok,
19
-        partialDeepStrictEqual,
20
-        rejects,
21
-        strictEqual,
22
-        throws,
23
-    } from "node:assert";
24
-    function strict(value: unknown, message?: string | Error): asserts value;
25
-    namespace strict {
26
-        export {
27
-            Assert,
28
-            AssertionError,
29
-            AssertionErrorOptions,
30
-            AssertOptions,
31
-            AssertPredicate,
32
-            AssertStrict,
33
-            deepStrictEqual,
34
-            deepStrictEqual as deepEqual,
35
-            doesNotMatch,
36
-            doesNotReject,
37
-            doesNotThrow,
38
-            fail,
39
-            ifError,
40
-            match,
41
-            notDeepStrictEqual,
42
-            notDeepStrictEqual as notDeepEqual,
43
-            notStrictEqual,
44
-            notStrictEqual as notEqual,
45
-            ok,
46
-            partialDeepStrictEqual,
47
-            rejects,
48
-            strict,
49
-            strictEqual,
50
-            strictEqual as equal,
51
-            throws,
52
-        };
53
-    }
54
-    export = strict;
55
-}
56
-declare module "assert/strict" {
57
-    import strict = require("node:assert/strict");
58
-    export = strict;
59
-}

+ 0 - 711
test/node_modules/@types/node/async_hooks.d.ts

@@ -1,711 +0,0 @@
1
-declare module "node:async_hooks" {
2
-    /**
3
-     * ```js
4
-     * import { executionAsyncId } from 'node:async_hooks';
5
-     * import fs from 'node:fs';
6
-     *
7
-     * console.log(executionAsyncId());  // 1 - bootstrap
8
-     * const path = '.';
9
-     * fs.open(path, 'r', (err, fd) => {
10
-     *   console.log(executionAsyncId());  // 6 - open()
11
-     * });
12
-     * ```
13
-     *
14
-     * The ID returned from `executionAsyncId()` is related to execution timing, not
15
-     * causality (which is covered by `triggerAsyncId()`):
16
-     *
17
-     * ```js
18
-     * const server = net.createServer((conn) => {
19
-     *   // Returns the ID of the server, not of the new connection, because the
20
-     *   // callback runs in the execution scope of the server's MakeCallback().
21
-     *   async_hooks.executionAsyncId();
22
-     *
23
-     * }).listen(port, () => {
24
-     *   // Returns the ID of a TickObject (process.nextTick()) because all
25
-     *   // callbacks passed to .listen() are wrapped in a nextTick().
26
-     *   async_hooks.executionAsyncId();
27
-     * });
28
-     * ```
29
-     *
30
-     * Promise contexts may not get precise `executionAsyncIds` by default.
31
-     * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
32
-     * @since v8.1.0
33
-     * @return The `asyncId` of the current execution context. Useful to track when something calls.
34
-     */
35
-    function executionAsyncId(): number;
36
-    /**
37
-     * Resource objects returned by `executionAsyncResource()` are most often internal
38
-     * Node.js handle objects with undocumented APIs. Using any functions or properties
39
-     * on the object is likely to crash your application and should be avoided.
40
-     *
41
-     * Using `executionAsyncResource()` in the top-level execution context will
42
-     * return an empty object as there is no handle or request object to use,
43
-     * but having an object representing the top-level can be helpful.
44
-     *
45
-     * ```js
46
-     * import { open } from 'node:fs';
47
-     * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
48
-     *
49
-     * console.log(executionAsyncId(), executionAsyncResource());  // 1 {}
50
-     * open(new URL(import.meta.url), 'r', (err, fd) => {
51
-     *   console.log(executionAsyncId(), executionAsyncResource());  // 7 FSReqWrap
52
-     * });
53
-     * ```
54
-     *
55
-     * This can be used to implement continuation local storage without the
56
-     * use of a tracking `Map` to store the metadata:
57
-     *
58
-     * ```js
59
-     * import { createServer } from 'node:http';
60
-     * import {
61
-     *   executionAsyncId,
62
-     *   executionAsyncResource,
63
-     *   createHook,
64
-     * } from 'node:async_hooks';
65
-     * const sym = Symbol('state'); // Private symbol to avoid pollution
66
-     *
67
-     * createHook({
68
-     *   init(asyncId, type, triggerAsyncId, resource) {
69
-     *     const cr = executionAsyncResource();
70
-     *     if (cr) {
71
-     *       resource[sym] = cr[sym];
72
-     *     }
73
-     *   },
74
-     * }).enable();
75
-     *
76
-     * const server = createServer((req, res) => {
77
-     *   executionAsyncResource()[sym] = { state: req.url };
78
-     *   setTimeout(function() {
79
-     *     res.end(JSON.stringify(executionAsyncResource()[sym]));
80
-     *   }, 100);
81
-     * }).listen(3000);
82
-     * ```
83
-     * @since v13.9.0, v12.17.0
84
-     * @return The resource representing the current execution. Useful to store data within the resource.
85
-     */
86
-    function executionAsyncResource(): object;
87
-    /**
88
-     * ```js
89
-     * const server = net.createServer((conn) => {
90
-     *   // The resource that caused (or triggered) this callback to be called
91
-     *   // was that of the new connection. Thus the return value of triggerAsyncId()
92
-     *   // is the asyncId of "conn".
93
-     *   async_hooks.triggerAsyncId();
94
-     *
95
-     * }).listen(port, () => {
96
-     *   // Even though all callbacks passed to .listen() are wrapped in a nextTick()
97
-     *   // the callback itself exists because the call to the server's .listen()
98
-     *   // was made. So the return value would be the ID of the server.
99
-     *   async_hooks.triggerAsyncId();
100
-     * });
101
-     * ```
102
-     *
103
-     * Promise contexts may not get valid `triggerAsyncId`s by default. See
104
-     * the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
105
-     * @return The ID of the resource responsible for calling the callback that is currently being executed.
106
-     */
107
-    function triggerAsyncId(): number;
108
-    interface HookCallbacks {
109
-        /**
110
-         * The [`init` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource).
111
-         */
112
-        init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
113
-        /**
114
-         * The [`before` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#beforeasyncid).
115
-         */
116
-        before?(asyncId: number): void;
117
-        /**
118
-         * The [`after` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#afterasyncid).
119
-         */
120
-        after?(asyncId: number): void;
121
-        /**
122
-         * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promiseresolveasyncid).
123
-         */
124
-        promiseResolve?(asyncId: number): void;
125
-        /**
126
-         * The [`destroy` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#destroyasyncid).
127
-         */
128
-        destroy?(asyncId: number): void;
129
-        /**
130
-         * Whether the hook should track `Promise`s. Cannot be `false` if
131
-         * `promiseResolve` is set.
132
-         * @default true
133
-         */
134
-        trackPromises?: boolean | undefined;
135
-    }
136
-    interface AsyncHook {
137
-        /**
138
-         * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
139
-         */
140
-        enable(): this;
141
-        /**
142
-         * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
143
-         */
144
-        disable(): this;
145
-    }
146
-    /**
147
-     * Registers functions to be called for different lifetime events of each async
148
-     * operation.
149
-     *
150
-     * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the
151
-     * respective asynchronous event during a resource's lifetime.
152
-     *
153
-     * All callbacks are optional. For example, if only resource cleanup needs to
154
-     * be tracked, then only the `destroy` callback needs to be passed. The
155
-     * specifics of all functions that can be passed to `callbacks` is in the
156
-     * [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) section.
157
-     *
158
-     * ```js
159
-     * import { createHook } from 'node:async_hooks';
160
-     *
161
-     * const asyncHook = createHook({
162
-     *   init(asyncId, type, triggerAsyncId, resource) { },
163
-     *   destroy(asyncId) { },
164
-     * });
165
-     * ```
166
-     *
167
-     * The callbacks will be inherited via the prototype chain:
168
-     *
169
-     * ```js
170
-     * class MyAsyncCallbacks {
171
-     *   init(asyncId, type, triggerAsyncId, resource) { }
172
-     *   destroy(asyncId) {}
173
-     * }
174
-     *
175
-     * class MyAddedCallbacks extends MyAsyncCallbacks {
176
-     *   before(asyncId) { }
177
-     *   after(asyncId) { }
178
-     * }
179
-     *
180
-     * const asyncHook = async_hooks.createHook(new MyAddedCallbacks());
181
-     * ```
182
-     *
183
-     * Because promises are asynchronous resources whose lifecycle is tracked
184
-     * via the async hooks mechanism, the `init()`, `before()`, `after()`, and
185
-     * `destroy()` callbacks _must not_ be async functions that return promises.
186
-     * @since v8.1.0
187
-     * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) to register
188
-     * @returns Instance used for disabling and enabling hooks
189
-     */
190
-    function createHook(options: HookCallbacks): AsyncHook;
191
-    interface AsyncResourceOptions {
192
-        /**
193
-         * The ID of the execution context that created this async event.
194
-         * @default executionAsyncId()
195
-         */
196
-        triggerAsyncId?: number | undefined;
197
-        /**
198
-         * Disables automatic `emitDestroy` when the object is garbage collected.
199
-         * This usually does not need to be set (even if `emitDestroy` is called
200
-         * manually), unless the resource's `asyncId` is retrieved and the
201
-         * sensitive API's `emitDestroy` is called with it.
202
-         * @default false
203
-         */
204
-        requireManualDestroy?: boolean | undefined;
205
-    }
206
-    /**
207
-     * The class `AsyncResource` is designed to be extended by the embedder's async
208
-     * resources. Using this, users can easily trigger the lifetime events of their
209
-     * own resources.
210
-     *
211
-     * The `init` hook will trigger when an `AsyncResource` is instantiated.
212
-     *
213
-     * The following is an overview of the `AsyncResource` API.
214
-     *
215
-     * ```js
216
-     * import { AsyncResource, executionAsyncId } from 'node:async_hooks';
217
-     *
218
-     * // AsyncResource() is meant to be extended. Instantiating a
219
-     * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then
220
-     * // async_hook.executionAsyncId() is used.
221
-     * const asyncResource = new AsyncResource(
222
-     *   type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
223
-     * );
224
-     *
225
-     * // Run a function in the execution context of the resource. This will
226
-     * // * establish the context of the resource
227
-     * // * trigger the AsyncHooks before callbacks
228
-     * // * call the provided function `fn` with the supplied arguments
229
-     * // * trigger the AsyncHooks after callbacks
230
-     * // * restore the original execution context
231
-     * asyncResource.runInAsyncScope(fn, thisArg, ...args);
232
-     *
233
-     * // Call AsyncHooks destroy callbacks.
234
-     * asyncResource.emitDestroy();
235
-     *
236
-     * // Return the unique ID assigned to the AsyncResource instance.
237
-     * asyncResource.asyncId();
238
-     *
239
-     * // Return the trigger ID for the AsyncResource instance.
240
-     * asyncResource.triggerAsyncId();
241
-     * ```
242
-     */
243
-    class AsyncResource {
244
-        /**
245
-         * AsyncResource() is meant to be extended. Instantiating a
246
-         * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
247
-         * async_hook.executionAsyncId() is used.
248
-         * @param type The type of async event.
249
-         * @param triggerAsyncId The ID of the execution context that created
250
-         *   this async event (default: `executionAsyncId()`), or an
251
-         *   AsyncResourceOptions object (since v9.3.0)
252
-         */
253
-        constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
254
-        /**
255
-         * Binds the given function to the current execution context.
256
-         * @since v14.8.0, v12.19.0
257
-         * @param fn The function to bind to the current execution context.
258
-         * @param type An optional name to associate with the underlying `AsyncResource`.
259
-         */
260
-        static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
261
-            fn: Func,
262
-            type?: string,
263
-            thisArg?: ThisArg,
264
-        ): Func;
265
-        /**
266
-         * Binds the given function to execute to this `AsyncResource`'s scope.
267
-         * @since v14.8.0, v12.19.0
268
-         * @param fn The function to bind to the current `AsyncResource`.
269
-         */
270
-        bind<Func extends (...args: any[]) => any>(fn: Func): Func;
271
-        /**
272
-         * Call the provided function with the provided arguments in the execution context
273
-         * of the async resource. This will establish the context, trigger the AsyncHooks
274
-         * before callbacks, call the function, trigger the AsyncHooks after callbacks, and
275
-         * then restore the original execution context.
276
-         * @since v9.6.0
277
-         * @param fn The function to call in the execution context of this async resource.
278
-         * @param thisArg The receiver to be used for the function call.
279
-         * @param args Optional arguments to pass to the function.
280
-         */
281
-        runInAsyncScope<This, Result>(
282
-            fn: (this: This, ...args: any[]) => Result,
283
-            thisArg?: This,
284
-            ...args: any[]
285
-        ): Result;
286
-        /**
287
-         * Call all `destroy` hooks. This should only ever be called once. An error will
288
-         * be thrown if it is called more than once. This **must** be manually called. If
289
-         * the resource is left to be collected by the GC then the `destroy` hooks will
290
-         * never be called.
291
-         * @return A reference to `asyncResource`.
292
-         */
293
-        emitDestroy(): this;
294
-        /**
295
-         * @return The unique `asyncId` assigned to the resource.
296
-         */
297
-        asyncId(): number;
298
-        /**
299
-         * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor.
300
-         */
301
-        triggerAsyncId(): number;
302
-    }
303
-    interface AsyncLocalStorageOptions {
304
-        /**
305
-         * The default value to be used when no store is provided.
306
-         */
307
-        defaultValue?: any;
308
-        /**
309
-         * A name for the `AsyncLocalStorage` value.
310
-         */
311
-        name?: string | undefined;
312
-    }
313
-    /**
314
-     * This class creates stores that stay coherent through asynchronous operations.
315
-     *
316
-     * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory
317
-     * safe implementation that involves significant optimizations that are non-obvious
318
-     * to implement.
319
-     *
320
-     * The following example uses `AsyncLocalStorage` to build a simple logger
321
-     * that assigns IDs to incoming HTTP requests and includes them in messages
322
-     * logged within each request.
323
-     *
324
-     * ```js
325
-     * import http from 'node:http';
326
-     * import { AsyncLocalStorage } from 'node:async_hooks';
327
-     *
328
-     * const asyncLocalStorage = new AsyncLocalStorage();
329
-     *
330
-     * function logWithId(msg) {
331
-     *   const id = asyncLocalStorage.getStore();
332
-     *   console.log(`${id !== undefined ? id : '-'}:`, msg);
333
-     * }
334
-     *
335
-     * let idSeq = 0;
336
-     * http.createServer((req, res) => {
337
-     *   asyncLocalStorage.run(idSeq++, () => {
338
-     *     logWithId('start');
339
-     *     // Imagine any chain of async operations here
340
-     *     setImmediate(() => {
341
-     *       logWithId('finish');
342
-     *       res.end();
343
-     *     });
344
-     *   });
345
-     * }).listen(8080);
346
-     *
347
-     * http.get('http://localhost:8080');
348
-     * http.get('http://localhost:8080');
349
-     * // Prints:
350
-     * //   0: start
351
-     * //   0: finish
352
-     * //   1: start
353
-     * //   1: finish
354
-     * ```
355
-     *
356
-     * Each instance of `AsyncLocalStorage` maintains an independent storage context.
357
-     * Multiple instances can safely exist simultaneously without risk of interfering
358
-     * with each other's data.
359
-     * @since v13.10.0, v12.17.0
360
-     */
361
-    class AsyncLocalStorage<T> {
362
-        /**
363
-         * Creates a new instance of `AsyncLocalStorage`. Store is only provided within a
364
-         * `run()` call or after an `enterWith()` call.
365
-         */
366
-        constructor(options?: AsyncLocalStorageOptions);
367
-        /**
368
-         * Binds the given function to the current execution context.
369
-         * @since v19.8.0
370
-         * @param fn The function to bind to the current execution context.
371
-         * @return A new function that calls `fn` within the captured execution context.
372
-         */
373
-        static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
374
-        /**
375
-         * Captures the current execution context and returns a function that accepts a
376
-         * function as an argument. Whenever the returned function is called, it
377
-         * calls the function passed to it within the captured context.
378
-         *
379
-         * ```js
380
-         * const asyncLocalStorage = new AsyncLocalStorage();
381
-         * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
382
-         * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
383
-         * console.log(result);  // returns 123
384
-         * ```
385
-         *
386
-         * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
387
-         * async context tracking purposes, for example:
388
-         *
389
-         * ```js
390
-         * class Foo {
391
-         *   #runInAsyncScope = AsyncLocalStorage.snapshot();
392
-         *
393
-         *   get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
394
-         * }
395
-         *
396
-         * const foo = asyncLocalStorage.run(123, () => new Foo());
397
-         * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
398
-         * ```
399
-         * @since v19.8.0
400
-         * @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
401
-         */
402
-        static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
403
-        /**
404
-         * Disables the instance of `AsyncLocalStorage`. All subsequent calls
405
-         * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again.
406
-         *
407
-         * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
408
-         * instance will be exited.
409
-         *
410
-         * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores
411
-         * provided by the `asyncLocalStorage`, as those objects are garbage collected
412
-         * along with the corresponding async resources.
413
-         *
414
-         * Use this method when the `asyncLocalStorage` is not in use anymore
415
-         * in the current process.
416
-         * @since v13.10.0, v12.17.0
417
-         * @experimental
418
-         */
419
-        disable(): void;
420
-        /**
421
-         * Returns the current store.
422
-         * If called outside of an asynchronous context initialized by
423
-         * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it
424
-         * returns `undefined`.
425
-         * @since v13.10.0, v12.17.0
426
-         */
427
-        getStore(): T | undefined;
428
-        /**
429
-         * The name of the `AsyncLocalStorage` instance if provided.
430
-         * @since v24.0.0
431
-         */
432
-        readonly name: string;
433
-        /**
434
-         * Runs a function synchronously within a context and returns its
435
-         * return value. The store is not accessible outside of the callback function.
436
-         * The store is accessible to any asynchronous operations created within the
437
-         * callback.
438
-         *
439
-         * The optional `args` are passed to the callback function.
440
-         *
441
-         * If the callback function throws an error, the error is thrown by `run()` too.
442
-         * The stacktrace is not impacted by this call and the context is exited.
443
-         *
444
-         * Example:
445
-         *
446
-         * ```js
447
-         * const store = { id: 2 };
448
-         * try {
449
-         *   asyncLocalStorage.run(store, () => {
450
-         *     asyncLocalStorage.getStore(); // Returns the store object
451
-         *     setTimeout(() => {
452
-         *       asyncLocalStorage.getStore(); // Returns the store object
453
-         *     }, 200);
454
-         *     throw new Error();
455
-         *   });
456
-         * } catch (e) {
457
-         *   asyncLocalStorage.getStore(); // Returns undefined
458
-         *   // The error will be caught here
459
-         * }
460
-         * ```
461
-         * @since v13.10.0, v12.17.0
462
-         */
463
-        run<R>(store: T, callback: () => R): R;
464
-        run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;
465
-        /**
466
-         * Runs a function synchronously outside of a context and returns its
467
-         * return value. The store is not accessible within the callback function or
468
-         * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`.
469
-         *
470
-         * The optional `args` are passed to the callback function.
471
-         *
472
-         * If the callback function throws an error, the error is thrown by `exit()` too.
473
-         * The stacktrace is not impacted by this call and the context is re-entered.
474
-         *
475
-         * Example:
476
-         *
477
-         * ```js
478
-         * // Within a call to run
479
-         * try {
480
-         *   asyncLocalStorage.getStore(); // Returns the store object or value
481
-         *   asyncLocalStorage.exit(() => {
482
-         *     asyncLocalStorage.getStore(); // Returns undefined
483
-         *     throw new Error();
484
-         *   });
485
-         * } catch (e) {
486
-         *   asyncLocalStorage.getStore(); // Returns the same object or value
487
-         *   // The error will be caught here
488
-         * }
489
-         * ```
490
-         * @since v13.10.0, v12.17.0
491
-         * @experimental
492
-         */
493
-        exit<R, TArgs extends any[]>(callback: (...args: TArgs) => R, ...args: TArgs): R;
494
-        /**
495
-         * Creates a disposable scope that enters the given store and automatically
496
-         * restores the previous store value when the scope is disposed. This method is
497
-         * designed to work with JavaScript's explicit resource management (`using` syntax).
498
-         *
499
-         * Example:
500
-         *
501
-         * ```js
502
-         * import { AsyncLocalStorage } from 'node:async_hooks';
503
-         *
504
-         * const asyncLocalStorage = new AsyncLocalStorage();
505
-         *
506
-         * {
507
-         *   using _ = asyncLocalStorage.withScope('my-store');
508
-         *   console.log(asyncLocalStorage.getStore()); // Prints: my-store
509
-         * }
510
-         *
511
-         * console.log(asyncLocalStorage.getStore()); // Prints: undefined
512
-         * ```
513
-         *
514
-         * The `withScope()` method is particularly useful for managing context in
515
-         * synchronous code where you want to ensure the previous store value is restored
516
-         * when exiting a block, even if an error is thrown.
517
-         *
518
-         * ```js
519
-         * import { AsyncLocalStorage } from 'node:async_hooks';
520
-         *
521
-         * const asyncLocalStorage = new AsyncLocalStorage();
522
-         *
523
-         * try {
524
-         *   using _ = asyncLocalStorage.withScope('my-store');
525
-         *   console.log(asyncLocalStorage.getStore()); // Prints: my-store
526
-         *   throw new Error('test');
527
-         * } catch (e) {
528
-         *   // Store is automatically restored even after error
529
-         *   console.log(asyncLocalStorage.getStore()); // Prints: undefined
530
-         * }
531
-         * ```
532
-         *
533
-         * **Important:** When using `withScope()` in async functions before the first
534
-         * `await`, be aware that the scope change will affect the caller's context. The
535
-         * synchronous portion of an async function (before the first `await`) runs
536
-         * immediately when called, and when it reaches the first `await`, it returns the
537
-         * promise to the caller. At that point, the scope change becomes visible in the
538
-         * caller's context and will persist in subsequent synchronous code until something
539
-         * else changes the scope value. For async operations, prefer using `run()` which
540
-         * properly isolates context across async boundaries.
541
-         *
542
-         * ```js
543
-         * import { AsyncLocalStorage } from 'node:async_hooks';
544
-         *
545
-         * const asyncLocalStorage = new AsyncLocalStorage();
546
-         *
547
-         * async function example() {
548
-         *   using _ = asyncLocalStorage.withScope('my-store');
549
-         *   console.log(asyncLocalStorage.getStore()); // Prints: my-store
550
-         *   await someAsyncOperation(); // Function pauses here and returns promise
551
-         *   console.log(asyncLocalStorage.getStore()); // Prints: my-store
552
-         * }
553
-         *
554
-         * // Calling without await
555
-         * example(); // Synchronous portion runs, then pauses at first await
556
-         * // After the promise is returned, the scope 'my-store' is now active in caller!
557
-         * console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!)
558
-         * ```
559
-         * @since v25.9.0
560
-         * @experimental
561
-         */
562
-        withScope(store: T): RunScope;
563
-        /**
564
-         * Transitions into the context for the remainder of the current
565
-         * synchronous execution and then persists the store through any following
566
-         * asynchronous calls.
567
-         *
568
-         * Example:
569
-         *
570
-         * ```js
571
-         * const store = { id: 1 };
572
-         * // Replaces previous store with the given store object
573
-         * asyncLocalStorage.enterWith(store);
574
-         * asyncLocalStorage.getStore(); // Returns the store object
575
-         * someAsyncOperation(() => {
576
-         *   asyncLocalStorage.getStore(); // Returns the same object
577
-         * });
578
-         * ```
579
-         *
580
-         * This transition will continue for the _entire_ synchronous execution.
581
-         * This means that if, for example, the context is entered within an event
582
-         * handler subsequent event handlers will also run within that context unless
583
-         * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons
584
-         * to use the latter method.
585
-         *
586
-         * ```js
587
-         * const store = { id: 1 };
588
-         *
589
-         * emitter.on('my-event', () => {
590
-         *   asyncLocalStorage.enterWith(store);
591
-         * });
592
-         * emitter.on('my-event', () => {
593
-         *   asyncLocalStorage.getStore(); // Returns the same object
594
-         * });
595
-         *
596
-         * asyncLocalStorage.getStore(); // Returns undefined
597
-         * emitter.emit('my-event');
598
-         * asyncLocalStorage.getStore(); // Returns the same object
599
-         * ```
600
-         * @since v13.11.0, v12.17.0
601
-         * @experimental
602
-         */
603
-        enterWith(store: T): void;
604
-    }
605
-    /**
606
-     * A disposable scope returned by `asyncLocalStorage.withScope()` that
607
-     * automatically restores the previous store value when disposed. This class
608
-     * implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work
609
-     * with JavaScript's `using` syntax.
610
-     *
611
-     * The scope automatically restores the previous store value when the `using` block
612
-     * exits, whether through normal completion or by throwing an error.
613
-     * @since v25.9.0
614
-     * @experimental
615
-     */
616
-    interface RunScope extends Disposable {
617
-        /**
618
-         * Explicitly ends the scope and restores the previous store value. This method
619
-         * is idempotent: calling it multiple times has the same effect as calling it once.
620
-         *
621
-         * The `[Symbol.dispose]()` method defers to `dispose()`.
622
-         *
623
-         * If `withScope()` is called without the `using` keyword, `dispose()` must be
624
-         * called manually to restore the previous store value. Forgetting to call
625
-         * `dispose()` will cause the store value to persist for the remainder of the
626
-         * current execution context:
627
-         *
628
-         * ```js
629
-         * import { AsyncLocalStorage } from 'node:async_hooks';
630
-         *
631
-         * const storage = new AsyncLocalStorage();
632
-         *
633
-         * // Without using, the scope must be disposed manually
634
-         * const scope = storage.withScope('my-store');
635
-         * // storage.getStore() === 'my-store' here
636
-         *
637
-         * scope.dispose(); // Restore previous value
638
-         * // storage.getStore() === undefined here
639
-         * ```
640
-         * @since v25.9.0
641
-         */
642
-        dispose(): void;
643
-    }
644
-    /**
645
-     * @since v17.2.0, v16.14.0
646
-     * @return A map of provider types to the corresponding numeric id.
647
-     * This map contains all the event types that might be emitted by the `async_hooks.init()` event.
648
-     */
649
-    namespace asyncWrapProviders {
650
-        const NONE: number;
651
-        const DIRHANDLE: number;
652
-        const DNSCHANNEL: number;
653
-        const ELDHISTOGRAM: number;
654
-        const FILEHANDLE: number;
655
-        const FILEHANDLECLOSEREQ: number;
656
-        const FIXEDSIZEBLOBCOPY: number;
657
-        const FSEVENTWRAP: number;
658
-        const FSREQCALLBACK: number;
659
-        const FSREQPROMISE: number;
660
-        const GETADDRINFOREQWRAP: number;
661
-        const GETNAMEINFOREQWRAP: number;
662
-        const HEAPSNAPSHOT: number;
663
-        const HTTP2SESSION: number;
664
-        const HTTP2STREAM: number;
665
-        const HTTP2PING: number;
666
-        const HTTP2SETTINGS: number;
667
-        const HTTPINCOMINGMESSAGE: number;
668
-        const HTTPCLIENTREQUEST: number;
669
-        const JSSTREAM: number;
670
-        const JSUDPWRAP: number;
671
-        const MESSAGEPORT: number;
672
-        const PIPECONNECTWRAP: number;
673
-        const PIPESERVERWRAP: number;
674
-        const PIPEWRAP: number;
675
-        const PROCESSWRAP: number;
676
-        const PROMISE: number;
677
-        const QUERYWRAP: number;
678
-        const SHUTDOWNWRAP: number;
679
-        const SIGNALWRAP: number;
680
-        const STATWATCHER: number;
681
-        const STREAMPIPE: number;
682
-        const TCPCONNECTWRAP: number;
683
-        const TCPSERVERWRAP: number;
684
-        const TCPWRAP: number;
685
-        const TTYWRAP: number;
686
-        const UDPSENDWRAP: number;
687
-        const UDPWRAP: number;
688
-        const SIGINTWATCHDOG: number;
689
-        const WORKER: number;
690
-        const WORKERHEAPSNAPSHOT: number;
691
-        const WRITEWRAP: number;
692
-        const ZLIB: number;
693
-        const CHECKPRIMEREQUEST: number;
694
-        const PBKDF2REQUEST: number;
695
-        const KEYPAIRGENREQUEST: number;
696
-        const KEYGENREQUEST: number;
697
-        const KEYEXPORTREQUEST: number;
698
-        const CIPHERREQUEST: number;
699
-        const DERIVEBITSREQUEST: number;
700
-        const HASHREQUEST: number;
701
-        const RANDOMBYTESREQUEST: number;
702
-        const RANDOMPRIMEREQUEST: number;
703
-        const SCRYPTREQUEST: number;
704
-        const SIGNREQUEST: number;
705
-        const TLSWRAP: number;
706
-        const VERIFYREQUEST: number;
707
-    }
708
-}
709
-declare module "async_hooks" {
710
-    export * from "node:async_hooks";
711
-}

+ 0 - 466
test/node_modules/@types/node/buffer.buffer.d.ts

@@ -1,466 +0,0 @@
1
-declare module "node:buffer" {
2
-    type ImplicitArrayBuffer<T extends WithImplicitCoercion<ArrayBufferLike>> = T extends
3
-        { valueOf(): infer V extends ArrayBufferLike } ? V : T;
4
-    global {
5
-        interface BufferConstructor {
6
-            // see buffer.d.ts for implementation shared with all TypeScript versions
7
-
8
-            /**
9
-             * Allocates a new buffer containing the given {str}.
10
-             *
11
-             * @param str String to store in buffer.
12
-             * @param encoding encoding to use, optional.  Default is 'utf8'
13
-             * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
14
-             */
15
-            new(str: string, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
16
-            /**
17
-             * Allocates a new buffer of {size} octets.
18
-             *
19
-             * @param size count of octets to allocate.
20
-             * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
21
-             */
22
-            new(size: number): Buffer<ArrayBuffer>;
23
-            /**
24
-             * Allocates a new buffer containing the given {array} of octets.
25
-             *
26
-             * @param array The octets to store.
27
-             * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
28
-             */
29
-            new(array: ArrayLike<number>): Buffer<ArrayBuffer>;
30
-            /**
31
-             * Produces a Buffer backed by the same allocated memory as
32
-             * the given {ArrayBuffer}/{SharedArrayBuffer}.
33
-             *
34
-             * @param arrayBuffer The ArrayBuffer with which to share memory.
35
-             * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
36
-             */
37
-            new<TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(arrayBuffer: TArrayBuffer): Buffer<TArrayBuffer>;
38
-            /**
39
-             * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
40
-             * Array entries outside that range will be truncated to fit into it.
41
-             *
42
-             * ```js
43
-             * import { Buffer } from 'node:buffer';
44
-             *
45
-             * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
46
-             * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
47
-             * ```
48
-             *
49
-             * If `array` is an `Array`-like object (that is, one with a `length` property of
50
-             * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
51
-             * a `Uint8Array`. This means all other `TypedArray` variants get treated as an
52
-             * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use
53
-             * `Buffer.copyBytesFrom()`.
54
-             *
55
-             * A `TypeError` will be thrown if `array` is not an `Array` or another type
56
-             * appropriate for `Buffer.from()` variants.
57
-             *
58
-             * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal
59
-             * `Buffer` pool like `Buffer.allocUnsafe()` does.
60
-             * @since v5.10.0
61
-             */
62
-            from(array: WithImplicitCoercion<ArrayLike<number>>): Buffer<ArrayBuffer>;
63
-            /**
64
-             * This creates a view of the `ArrayBuffer` without copying the underlying
65
-             * memory. For example, when passed a reference to the `.buffer` property of a
66
-             * `TypedArray` instance, the newly created `Buffer` will share the same
67
-             * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`.
68
-             *
69
-             * ```js
70
-             * import { Buffer } from 'node:buffer';
71
-             *
72
-             * const arr = new Uint16Array(2);
73
-             *
74
-             * arr[0] = 5000;
75
-             * arr[1] = 4000;
76
-             *
77
-             * // Shares memory with `arr`.
78
-             * const buf = Buffer.from(arr.buffer);
79
-             *
80
-             * console.log(buf);
81
-             * // Prints: <Buffer 88 13 a0 0f>
82
-             *
83
-             * // Changing the original Uint16Array changes the Buffer also.
84
-             * arr[1] = 6000;
85
-             *
86
-             * console.log(buf);
87
-             * // Prints: <Buffer 88 13 70 17>
88
-             * ```
89
-             *
90
-             * The optional `byteOffset` and `length` arguments specify a memory range within
91
-             * the `arrayBuffer` that will be shared by the `Buffer`.
92
-             *
93
-             * ```js
94
-             * import { Buffer } from 'node:buffer';
95
-             *
96
-             * const ab = new ArrayBuffer(10);
97
-             * const buf = Buffer.from(ab, 0, 2);
98
-             *
99
-             * console.log(buf.length);
100
-             * // Prints: 2
101
-             * ```
102
-             *
103
-             * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a
104
-             * `SharedArrayBuffer` or another type appropriate for `Buffer.from()`
105
-             * variants.
106
-             *
107
-             * It is important to remember that a backing `ArrayBuffer` can cover a range
108
-             * of memory that extends beyond the bounds of a `TypedArray` view. A new
109
-             * `Buffer` created using the `buffer` property of a `TypedArray` may extend
110
-             * beyond the range of the `TypedArray`:
111
-             *
112
-             * ```js
113
-             * import { Buffer } from 'node:buffer';
114
-             *
115
-             * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements
116
-             * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements
117
-             * console.log(arrA.buffer === arrB.buffer); // true
118
-             *
119
-             * const buf = Buffer.from(arrB.buffer);
120
-             * console.log(buf);
121
-             * // Prints: <Buffer 63 64 65 66>
122
-             * ```
123
-             * @since v5.10.0
124
-             * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the
125
-             * `.buffer` property of a `TypedArray`.
126
-             * @param byteOffset Index of first byte to expose. **Default:** `0`.
127
-             * @param length Number of bytes to expose. **Default:**
128
-             * `arrayBuffer.byteLength - byteOffset`.
129
-             */
130
-            from<TArrayBuffer extends WithImplicitCoercion<ArrayBufferLike>>(
131
-                arrayBuffer: TArrayBuffer,
132
-                byteOffset?: number,
133
-                length?: number,
134
-            ): Buffer<ImplicitArrayBuffer<TArrayBuffer>>;
135
-            /**
136
-             * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies
137
-             * the character encoding to be used when converting `string` into bytes.
138
-             *
139
-             * ```js
140
-             * import { Buffer } from 'node:buffer';
141
-             *
142
-             * const buf1 = Buffer.from('this is a tést');
143
-             * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');
144
-             *
145
-             * console.log(buf1.toString());
146
-             * // Prints: this is a tést
147
-             * console.log(buf2.toString());
148
-             * // Prints: this is a tést
149
-             * console.log(buf1.toString('latin1'));
150
-             * // Prints: this is a tést
151
-             * ```
152
-             *
153
-             * A `TypeError` will be thrown if `string` is not a string or another type
154
-             * appropriate for `Buffer.from()` variants.
155
-             *
156
-             * `Buffer.from(string)` may also use the internal `Buffer` pool like
157
-             * `Buffer.allocUnsafe()` does.
158
-             * @since v5.10.0
159
-             * @param string A string to encode.
160
-             * @param encoding The encoding of `string`. **Default:** `'utf8'`.
161
-             */
162
-            from(string: WithImplicitCoercion<string>, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
163
-            from(arrayOrString: WithImplicitCoercion<ArrayLike<number> | string>): Buffer<ArrayBuffer>;
164
-            /**
165
-             * Creates a new Buffer using the passed {data}
166
-             * @param values to create a new Buffer
167
-             */
168
-            of(...items: number[]): Buffer<ArrayBuffer>;
169
-            /**
170
-             * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
171
-             *
172
-             * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
173
-             *
174
-             * If `totalLength` is not provided, it is calculated from the `Buffer` instances
175
-             * in `list` by adding their lengths.
176
-             *
177
-             * If `totalLength` is provided, it must be an unsigned integer. If the
178
-             * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
179
-             * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
180
-             * less than `totalLength`, the remaining space is filled with zeros.
181
-             *
182
-             * ```js
183
-             * import { Buffer } from 'node:buffer';
184
-             *
185
-             * // Create a single `Buffer` from a list of three `Buffer` instances.
186
-             *
187
-             * const buf1 = Buffer.alloc(10);
188
-             * const buf2 = Buffer.alloc(14);
189
-             * const buf3 = Buffer.alloc(18);
190
-             * const totalLength = buf1.length + buf2.length + buf3.length;
191
-             *
192
-             * console.log(totalLength);
193
-             * // Prints: 42
194
-             *
195
-             * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
196
-             *
197
-             * console.log(bufA);
198
-             * // Prints: <Buffer 00 00 00 00 ...>
199
-             * console.log(bufA.length);
200
-             * // Prints: 42
201
-             * ```
202
-             *
203
-             * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
204
-             * @since v0.7.11
205
-             * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
206
-             * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
207
-             */
208
-            concat(list: readonly Uint8Array[], totalLength?: number): Buffer<ArrayBuffer>;
209
-            /**
210
-             * Copies the underlying memory of `view` into a new `Buffer`.
211
-             *
212
-             * ```js
213
-             * const u16 = new Uint16Array([0, 0xffff]);
214
-             * const buf = Buffer.copyBytesFrom(u16, 1, 1);
215
-             * u16[1] = 0;
216
-             * console.log(buf.length); // 2
217
-             * console.log(buf[0]); // 255
218
-             * console.log(buf[1]); // 255
219
-             * ```
220
-             * @since v19.8.0
221
-             * @param view The {TypedArray} to copy.
222
-             * @param [offset=0] The starting offset within `view`.
223
-             * @param [length=view.length - offset] The number of elements from `view` to copy.
224
-             */
225
-            copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer<ArrayBuffer>;
226
-            /**
227
-             * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
228
-             *
229
-             * ```js
230
-             * import { Buffer } from 'node:buffer';
231
-             *
232
-             * const buf = Buffer.alloc(5);
233
-             *
234
-             * console.log(buf);
235
-             * // Prints: <Buffer 00 00 00 00 00>
236
-             * ```
237
-             *
238
-             * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
239
-             *
240
-             * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
241
-             *
242
-             * ```js
243
-             * import { Buffer } from 'node:buffer';
244
-             *
245
-             * const buf = Buffer.alloc(5, 'a');
246
-             *
247
-             * console.log(buf);
248
-             * // Prints: <Buffer 61 61 61 61 61>
249
-             * ```
250
-             *
251
-             * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
252
-             * initialized by calling `buf.fill(fill, encoding)`.
253
-             *
254
-             * ```js
255
-             * import { Buffer } from 'node:buffer';
256
-             *
257
-             * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
258
-             *
259
-             * console.log(buf);
260
-             * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
261
-             * ```
262
-             *
263
-             * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
264
-             * contents will never contain sensitive data from previous allocations, including
265
-             * data that might not have been allocated for `Buffer`s.
266
-             *
267
-             * A `TypeError` will be thrown if `size` is not a number.
268
-             * @since v5.10.0
269
-             * @param size The desired length of the new `Buffer`.
270
-             * @param [fill=0] A value to pre-fill the new `Buffer` with.
271
-             * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
272
-             */
273
-            alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer<ArrayBuffer>;
274
-            /**
275
-             * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
276
-             *
277
-             * The underlying memory for `Buffer` instances created in this way is _not_
278
-             * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
279
-             *
280
-             * ```js
281
-             * import { Buffer } from 'node:buffer';
282
-             *
283
-             * const buf = Buffer.allocUnsafe(10);
284
-             *
285
-             * console.log(buf);
286
-             * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
287
-             *
288
-             * buf.fill(0);
289
-             *
290
-             * console.log(buf);
291
-             * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
292
-             * ```
293
-             *
294
-             * A `TypeError` will be thrown if `size` is not a number.
295
-             *
296
-             * The `Buffer` module pre-allocates an internal `Buffer` instance of
297
-             * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
298
-             * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
299
-             *
300
-             * Use of this pre-allocated internal memory pool is a key difference between
301
-             * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
302
-             * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
303
-             * than or equal to half `Buffer.poolSize`. The
304
-             * difference is subtle but can be important when an application requires the
305
-             * additional performance that `Buffer.allocUnsafe()` provides.
306
-             * @since v5.10.0
307
-             * @param size The desired length of the new `Buffer`.
308
-             */
309
-            allocUnsafe(size: number): Buffer<ArrayBuffer>;
310
-            /**
311
-             * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
312
-             * `size` is 0.
313
-             *
314
-             * The underlying memory for `Buffer` instances created in this way is _not_
315
-             * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
316
-             * such `Buffer` instances with zeroes.
317
-             *
318
-             * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
319
-             * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
320
-             * allows applications to avoid the garbage collection overhead of creating many
321
-             * individually allocated `Buffer` instances. This approach improves both
322
-             * performance and memory usage by eliminating the need to track and clean up as
323
-             * many individual `ArrayBuffer` objects.
324
-             *
325
-             * However, in the case where a developer may need to retain a small chunk of
326
-             * memory from a pool for an indeterminate amount of time, it may be appropriate
327
-             * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
328
-             * then copying out the relevant bits.
329
-             *
330
-             * ```js
331
-             * import { Buffer } from 'node:buffer';
332
-             *
333
-             * // Need to keep around a few small chunks of memory.
334
-             * const store = [];
335
-             *
336
-             * socket.on('readable', () => {
337
-             *   let data;
338
-             *   while (null !== (data = readable.read())) {
339
-             *     // Allocate for retained data.
340
-             *     const sb = Buffer.allocUnsafeSlow(10);
341
-             *
342
-             *     // Copy the data into the new allocation.
343
-             *     data.copy(sb, 0, 0, 10);
344
-             *
345
-             *     store.push(sb);
346
-             *   }
347
-             * });
348
-             * ```
349
-             *
350
-             * A `TypeError` will be thrown if `size` is not a number.
351
-             * @since v5.12.0
352
-             * @param size The desired length of the new `Buffer`.
353
-             */
354
-            allocUnsafeSlow(size: number): Buffer<ArrayBuffer>;
355
-        }
356
-        interface Buffer<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends Uint8Array<TArrayBuffer> {
357
-            // see buffer.d.ts for implementation shared with all TypeScript versions
358
-
359
-            /**
360
-             * Returns a new `Buffer` that references the same memory as the original, but
361
-             * offset and cropped by the `start` and `end` indices.
362
-             *
363
-             * This method is not compatible with the `Uint8Array.prototype.slice()`,
364
-             * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
365
-             *
366
-             * ```js
367
-             * import { Buffer } from 'node:buffer';
368
-             *
369
-             * const buf = Buffer.from('buffer');
370
-             *
371
-             * const copiedBuf = Uint8Array.prototype.slice.call(buf);
372
-             * copiedBuf[0]++;
373
-             * console.log(copiedBuf.toString());
374
-             * // Prints: cuffer
375
-             *
376
-             * console.log(buf.toString());
377
-             * // Prints: buffer
378
-             *
379
-             * // With buf.slice(), the original buffer is modified.
380
-             * const notReallyCopiedBuf = buf.slice();
381
-             * notReallyCopiedBuf[0]++;
382
-             * console.log(notReallyCopiedBuf.toString());
383
-             * // Prints: cuffer
384
-             * console.log(buf.toString());
385
-             * // Also prints: cuffer (!)
386
-             * ```
387
-             * @since v0.3.0
388
-             * @deprecated Use `subarray` instead.
389
-             * @param [start=0] Where the new `Buffer` will start.
390
-             * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
391
-             */
392
-            slice(start?: number, end?: number): Buffer<ArrayBuffer>;
393
-            /**
394
-             * Returns a new `Buffer` that references the same memory as the original, but
395
-             * offset and cropped by the `start` and `end` indices.
396
-             *
397
-             * Specifying `end` greater than `buf.length` will return the same result as
398
-             * that of `end` equal to `buf.length`.
399
-             *
400
-             * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
401
-             *
402
-             * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
403
-             *
404
-             * ```js
405
-             * import { Buffer } from 'node:buffer';
406
-             *
407
-             * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
408
-             * // from the original `Buffer`.
409
-             *
410
-             * const buf1 = Buffer.allocUnsafe(26);
411
-             *
412
-             * for (let i = 0; i < 26; i++) {
413
-             *   // 97 is the decimal ASCII value for 'a'.
414
-             *   buf1[i] = i + 97;
415
-             * }
416
-             *
417
-             * const buf2 = buf1.subarray(0, 3);
418
-             *
419
-             * console.log(buf2.toString('ascii', 0, buf2.length));
420
-             * // Prints: abc
421
-             *
422
-             * buf1[0] = 33;
423
-             *
424
-             * console.log(buf2.toString('ascii', 0, buf2.length));
425
-             * // Prints: !bc
426
-             * ```
427
-             *
428
-             * Specifying negative indexes causes the slice to be generated relative to the
429
-             * end of `buf` rather than the beginning.
430
-             *
431
-             * ```js
432
-             * import { Buffer } from 'node:buffer';
433
-             *
434
-             * const buf = Buffer.from('buffer');
435
-             *
436
-             * console.log(buf.subarray(-6, -1).toString());
437
-             * // Prints: buffe
438
-             * // (Equivalent to buf.subarray(0, 5).)
439
-             *
440
-             * console.log(buf.subarray(-6, -2).toString());
441
-             * // Prints: buff
442
-             * // (Equivalent to buf.subarray(0, 4).)
443
-             *
444
-             * console.log(buf.subarray(-5, -2).toString());
445
-             * // Prints: uff
446
-             * // (Equivalent to buf.subarray(1, 4).)
447
-             * ```
448
-             * @since v3.0.0
449
-             * @param [start=0] Where the new `Buffer` will start.
450
-             * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
451
-             */
452
-            subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
453
-        }
454
-        // TODO: remove globals in future version
455
-        /**
456
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
457
-         * TypeScript versions earlier than 5.7.
458
-         */
459
-        type NonSharedBuffer = Buffer<ArrayBuffer>;
460
-        /**
461
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
462
-         * TypeScript versions earlier than 5.7.
463
-         */
464
-        type AllowSharedBuffer = Buffer<ArrayBufferLike>;
465
-    }
466
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 1765
test/node_modules/@types/node/buffer.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 0 - 1366
test/node_modules/@types/node/child_process.d.ts


+ 0 - 432
test/node_modules/@types/node/cluster.d.ts

@@ -1,432 +0,0 @@
1
-declare module "node:cluster" {
2
-    import * as child_process from "node:child_process";
3
-    import { EventEmitter, InternalEventEmitter } from "node:events";
4
-    class Worker implements EventEmitter {
5
-        constructor(options?: cluster.WorkerOptions);
6
-        /**
7
-         * Each new worker is given its own unique id, this id is stored in the `id`.
8
-         *
9
-         * While a worker is alive, this is the key that indexes it in `cluster.workers`.
10
-         * @since v0.8.0
11
-         */
12
-        id: number;
13
-        /**
14
-         * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
15
-         * from this function is stored as `.process`. In a worker, the global `process` is stored.
16
-         *
17
-         * See: [Child Process module](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processforkmodulepath-args-options).
18
-         *
19
-         * Workers will call `process.exit(0)` if the `'disconnect'` event occurs
20
-         * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
21
-         * accidental disconnection.
22
-         * @since v0.7.0
23
-         */
24
-        process: child_process.ChildProcess;
25
-        /**
26
-         * Send a message to a worker or primary, optionally with a handle.
27
-         *
28
-         * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
29
-         *
30
-         * In a worker, this sends a message to the primary. It is identical to `process.send()`.
31
-         *
32
-         * This example will echo back all messages from the primary:
33
-         *
34
-         * ```js
35
-         * if (cluster.isPrimary) {
36
-         *   const worker = cluster.fork();
37
-         *   worker.send('hi there');
38
-         *
39
-         * } else if (cluster.isWorker) {
40
-         *   process.on('message', (msg) => {
41
-         *     process.send(msg);
42
-         *   });
43
-         * }
44
-         * ```
45
-         * @since v0.7.0
46
-         * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles.
47
-         */
48
-        send(message: child_process.Serializable, callback?: (error: Error | null) => void): boolean;
49
-        send(
50
-            message: child_process.Serializable,
51
-            sendHandle: child_process.SendHandle,
52
-            callback?: (error: Error | null) => void,
53
-        ): boolean;
54
-        send(
55
-            message: child_process.Serializable,
56
-            sendHandle: child_process.SendHandle,
57
-            options?: child_process.MessageOptions,
58
-            callback?: (error: Error | null) => void,
59
-        ): boolean;
60
-        /**
61
-         * This function will kill the worker. In the primary worker, it does this by
62
-         * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`.
63
-         *
64
-         * The `kill()` function kills the worker process without waiting for a graceful
65
-         * disconnect, it has the same behavior as `worker.process.kill()`.
66
-         *
67
-         * This method is aliased as `worker.destroy()` for backwards compatibility.
68
-         *
69
-         * In a worker, `process.kill()` exists, but it is not this function;
70
-         * it is [`kill()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processkillpid-signal).
71
-         * @since v0.9.12
72
-         * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
73
-         */
74
-        kill(signal?: string): void;
75
-        destroy(signal?: string): void;
76
-        /**
77
-         * In a worker, this function will close all servers, wait for the `'close'` event
78
-         * on those servers, and then disconnect the IPC channel.
79
-         *
80
-         * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself.
81
-         *
82
-         * Causes `.exitedAfterDisconnect` to be set.
83
-         *
84
-         * After a server is closed, it will no longer accept new connections,
85
-         * but connections may be accepted by any other listening worker. Existing
86
-         * connections will be allowed to close as usual. When no more connections exist,
87
-         * see `server.close()`, the IPC channel to the worker will close allowing it
88
-         * to die gracefully.
89
-         *
90
-         * The above applies _only_ to server connections, client connections are not
91
-         * automatically closed by workers, and disconnect does not wait for them to close
92
-         * before exiting.
93
-         *
94
-         * In a worker, `process.disconnect` exists, but it is not this function;
95
-         * it is `disconnect()`.
96
-         *
97
-         * Because long living server connections may block workers from disconnecting, it
98
-         * may be useful to send a message, so application specific actions may be taken to
99
-         * close them. It also may be useful to implement a timeout, killing a worker if
100
-         * the `'disconnect'` event has not been emitted after some time.
101
-         *
102
-         * ```js
103
-         * import net from 'node:net';
104
-         *
105
-         * if (cluster.isPrimary) {
106
-         *   const worker = cluster.fork();
107
-         *   let timeout;
108
-         *
109
-         *   worker.on('listening', (address) => {
110
-         *     worker.send('shutdown');
111
-         *     worker.disconnect();
112
-         *     timeout = setTimeout(() => {
113
-         *       worker.kill();
114
-         *     }, 2000);
115
-         *   });
116
-         *
117
-         *   worker.on('disconnect', () => {
118
-         *     clearTimeout(timeout);
119
-         *   });
120
-         *
121
-         * } else if (cluster.isWorker) {
122
-         *   const server = net.createServer((socket) => {
123
-         *     // Connections never end
124
-         *   });
125
-         *
126
-         *   server.listen(8000);
127
-         *
128
-         *   process.on('message', (msg) => {
129
-         *     if (msg === 'shutdown') {
130
-         *       // Initiate graceful close of any connections to server
131
-         *     }
132
-         *   });
133
-         * }
134
-         * ```
135
-         * @since v0.7.7
136
-         * @return A reference to `worker`.
137
-         */
138
-        disconnect(): this;
139
-        /**
140
-         * This function returns `true` if the worker is connected to its primary via its
141
-         * IPC channel, `false` otherwise. A worker is connected to its primary after it
142
-         * has been created. It is disconnected after the `'disconnect'` event is emitted.
143
-         * @since v0.11.14
144
-         */
145
-        isConnected(): boolean;
146
-        /**
147
-         * This function returns `true` if the worker's process has terminated (either
148
-         * because of exiting or being signaled). Otherwise, it returns `false`.
149
-         *
150
-         * ```js
151
-         * import cluster from 'node:cluster';
152
-         * import http from 'node:http';
153
-         * import { availableParallelism } from 'node:os';
154
-         * import process from 'node:process';
155
-         *
156
-         * const numCPUs = availableParallelism();
157
-         *
158
-         * if (cluster.isPrimary) {
159
-         *   console.log(`Primary ${process.pid} is running`);
160
-         *
161
-         *   // Fork workers.
162
-         *   for (let i = 0; i < numCPUs; i++) {
163
-         *     cluster.fork();
164
-         *   }
165
-         *
166
-         *   cluster.on('fork', (worker) => {
167
-         *     console.log('worker is dead:', worker.isDead());
168
-         *   });
169
-         *
170
-         *   cluster.on('exit', (worker, code, signal) => {
171
-         *     console.log('worker is dead:', worker.isDead());
172
-         *   });
173
-         * } else {
174
-         *   // Workers can share any TCP connection. In this case, it is an HTTP server.
175
-         *   http.createServer((req, res) => {
176
-         *     res.writeHead(200);
177
-         *     res.end(`Current process\n ${process.pid}`);
178
-         *     process.kill(process.pid);
179
-         *   }).listen(8000);
180
-         * }
181
-         * ```
182
-         * @since v0.11.14
183
-         */
184
-        isDead(): boolean;
185
-        /**
186
-         * This property is `true` if the worker exited due to `.disconnect()`.
187
-         * If the worker exited any other way, it is `false`. If the
188
-         * worker has not exited, it is `undefined`.
189
-         *
190
-         * The boolean `worker.exitedAfterDisconnect` allows distinguishing between
191
-         * voluntary and accidental exit, the primary may choose not to respawn a worker
192
-         * based on this value.
193
-         *
194
-         * ```js
195
-         * cluster.on('exit', (worker, code, signal) => {
196
-         *   if (worker.exitedAfterDisconnect === true) {
197
-         *     console.log('Oh, it was just voluntary – no need to worry');
198
-         *   }
199
-         * });
200
-         *
201
-         * // kill worker
202
-         * worker.kill();
203
-         * ```
204
-         * @since v6.0.0
205
-         */
206
-        exitedAfterDisconnect: boolean;
207
-    }
208
-    interface Worker extends InternalEventEmitter<cluster.WorkerEventMap> {}
209
-    type _Worker = Worker;
210
-    namespace cluster {
211
-        interface Worker extends _Worker {}
212
-        interface WorkerOptions {
213
-            id?: number | undefined;
214
-            process?: child_process.ChildProcess | undefined;
215
-            state?: string | undefined;
216
-        }
217
-        interface WorkerEventMap {
218
-            "disconnect": [];
219
-            "error": [error: Error];
220
-            "exit": [code: number, signal: string];
221
-            "listening": [address: Address];
222
-            "message": [message: any, handle: child_process.SendHandle];
223
-            "online": [];
224
-        }
225
-        interface ClusterSettings {
226
-            /**
227
-             * List of string arguments passed to the Node.js executable.
228
-             * @default process.execArgv
229
-             */
230
-            execArgv?: string[] | undefined;
231
-            /**
232
-             * File path to worker file.
233
-             * @default process.argv[1]
234
-             */
235
-            exec?: string | undefined;
236
-            /**
237
-             * String arguments passed to worker.
238
-             * @default process.argv.slice(2)
239
-             */
240
-            args?: readonly string[] | undefined;
241
-            /**
242
-             * Whether or not to send output to parent's stdio.
243
-             * @default false
244
-             */
245
-            silent?: boolean | undefined;
246
-            /**
247
-             * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
248
-             * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#child_processspawncommand-args-options)'s
249
-             * [`stdio`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#optionsstdio).
250
-             */
251
-            stdio?: any[] | undefined;
252
-            /**
253
-             * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).)
254
-             */
255
-            uid?: number | undefined;
256
-            /**
257
-             * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).)
258
-             */
259
-            gid?: number | undefined;
260
-            /**
261
-             * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number.
262
-             * By default each worker gets its own port, incremented from the primary's `process.debugPort`.
263
-             */
264
-            inspectPort?: number | (() => number) | undefined;
265
-            /**
266
-             * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
267
-             * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v25.x/api/child_process.html#advanced-serialization) for more details.
268
-             * @default false
269
-             */
270
-            serialization?: "json" | "advanced" | undefined;
271
-            /**
272
-             * Current working directory of the worker process.
273
-             * @default undefined (inherits from parent process)
274
-             */
275
-            cwd?: string | undefined;
276
-            /**
277
-             * Hide the forked processes console window that would normally be created on Windows systems.
278
-             * @default false
279
-             */
280
-            windowsHide?: boolean | undefined;
281
-        }
282
-        interface Address {
283
-            address: string;
284
-            port: number;
285
-            /**
286
-             * The `addressType` is one of:
287
-             *
288
-             * * `4` (TCPv4)
289
-             * * `6` (TCPv6)
290
-             * * `-1` (Unix domain socket)
291
-             * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6)
292
-             */
293
-            addressType: 4 | 6 | -1 | "udp4" | "udp6";
294
-        }
295
-        interface ClusterEventMap {
296
-            "disconnect": [worker: Worker];
297
-            "exit": [worker: Worker, code: number, signal: string];
298
-            "fork": [worker: Worker];
299
-            "listening": [worker: Worker, address: Address];
300
-            "message": [worker: Worker, message: any, handle: child_process.SendHandle];
301
-            "online": [worker: Worker];
302
-            "setup": [settings: ClusterSettings];
303
-        }
304
-        interface Cluster extends InternalEventEmitter<ClusterEventMap> {
305
-            /**
306
-             * A `Worker` object contains all public information and method about a worker.
307
-             * In the primary it can be obtained using `cluster.workers`. In a worker
308
-             * it can be obtained using `cluster.worker`.
309
-             * @since v0.7.0
310
-             */
311
-            Worker: typeof Worker;
312
-            disconnect(callback?: () => void): void;
313
-            /**
314
-             * Spawn a new worker process.
315
-             *
316
-             * This can only be called from the primary process.
317
-             * @param env Key/value pairs to add to worker process environment.
318
-             * @since v0.6.0
319
-             */
320
-            fork(env?: any): Worker;
321
-            /** @deprecated since v16.0.0 - use isPrimary. */
322
-            readonly isMaster: boolean;
323
-            /**
324
-             * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID`
325
-             * is undefined, then `isPrimary` is `true`.
326
-             * @since v16.0.0
327
-             */
328
-            readonly isPrimary: boolean;
329
-            /**
330
-             * True if the process is not a primary (it is the negation of `cluster.isPrimary`).
331
-             * @since v0.6.0
332
-             */
333
-            readonly isWorker: boolean;
334
-            /**
335
-             * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
336
-             * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
337
-             * is called, whichever comes first.
338
-             *
339
-             * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute
340
-             * IOCP handles without incurring a large performance hit.
341
-             *
342
-             * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`.
343
-             * @since v0.11.2
344
-             */
345
-            schedulingPolicy: number;
346
-            /**
347
-             * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings)
348
-             * (or [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)) this settings object will contain
349
-             * the settings, including the default values.
350
-             *
351
-             * This object is not intended to be changed or set manually.
352
-             * @since v0.7.1
353
-             */
354
-            readonly settings: ClusterSettings;
355
-            /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clustersetupprimarysettings) instead. */
356
-            setupMaster(settings?: ClusterSettings): void;
357
-            /**
358
-             * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`.
359
-             *
360
-             * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv)
361
-             * and have no effect on workers that are already running.
362
-             *
363
-             * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
364
-             * [`.fork()`](https://nodejs.org/docs/latest-v25.x/api/cluster.html#clusterforkenv).
365
-             *
366
-             * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of
367
-             * `cluster.setupPrimary()` is called.
368
-             *
369
-             * ```js
370
-             * import cluster from 'node:cluster';
371
-             *
372
-             * cluster.setupPrimary({
373
-             *   exec: 'worker.js',
374
-             *   args: ['--use', 'https'],
375
-             *   silent: true,
376
-             * });
377
-             * cluster.fork(); // https worker
378
-             * cluster.setupPrimary({
379
-             *   exec: 'worker.js',
380
-             *   args: ['--use', 'http'],
381
-             * });
382
-             * cluster.fork(); // http worker
383
-             * ```
384
-             *
385
-             * This can only be called from the primary process.
386
-             * @since v16.0.0
387
-             */
388
-            setupPrimary(settings?: ClusterSettings): void;
389
-            /**
390
-             * A reference to the current worker object. Not available in the primary process.
391
-             *
392
-             * ```js
393
-             * import cluster from 'node:cluster';
394
-             *
395
-             * if (cluster.isPrimary) {
396
-             *   console.log('I am primary');
397
-             *   cluster.fork();
398
-             *   cluster.fork();
399
-             * } else if (cluster.isWorker) {
400
-             *   console.log(`I am worker #${cluster.worker.id}`);
401
-             * }
402
-             * ```
403
-             * @since v0.7.0
404
-             */
405
-            readonly worker?: Worker;
406
-            /**
407
-             * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process.
408
-             *
409
-             * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it
410
-             * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted.
411
-             *
412
-             * ```js
413
-             * import cluster from 'node:cluster';
414
-             *
415
-             * for (const worker of Object.values(cluster.workers)) {
416
-             *   worker.send('big announcement to all workers');
417
-             * }
418
-             * ```
419
-             * @since v0.7.0
420
-             */
421
-            readonly workers?: NodeJS.Dict<Worker>;
422
-            readonly SCHED_NONE: number;
423
-            readonly SCHED_RR: number;
424
-        }
425
-    }
426
-    var cluster: cluster.Cluster;
427
-    export = cluster;
428
-}
429
-declare module "cluster" {
430
-    import cluster = require("node:cluster");
431
-    export = cluster;
432
-}

+ 0 - 21
test/node_modules/@types/node/compatibility/iterators.d.ts

@@ -1,21 +0,0 @@
1
-// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
2
-// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
3
-// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
4
-// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
5
-// if lib.esnext.iterator is loaded.
6
-// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
7
-
8
-// Placeholders for TS <5.6
9
-interface IteratorObject<T, TReturn, TNext> {}
10
-interface AsyncIteratorObject<T, TReturn, TNext> {}
11
-
12
-declare namespace NodeJS {
13
-    // Populate iterator methods for TS <5.6
14
-    interface Iterator<T, TReturn, TNext> extends globalThis.Iterator<T, TReturn, TNext> {}
15
-    interface AsyncIterator<T, TReturn, TNext> extends globalThis.AsyncIterator<T, TReturn, TNext> {}
16
-
17
-    // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
18
-    type BuiltinIteratorReturn = ReturnType<any[][typeof Symbol.iterator]> extends
19
-        globalThis.Iterator<any, infer TReturn> ? TReturn
20
-        : any;
21
-}

+ 0 - 93
test/node_modules/@types/node/console.d.ts

@@ -1,93 +0,0 @@
1
-declare module "node:console" {
2
-    import { InspectOptions } from "node:util";
3
-    namespace console {
4
-        interface ConsoleOptions {
5
-            stdout: NodeJS.WritableStream;
6
-            stderr?: NodeJS.WritableStream | undefined;
7
-            /**
8
-             * Ignore errors when writing to the underlying streams.
9
-             * @default true
10
-             */
11
-            ignoreErrors?: boolean | undefined;
12
-            /**
13
-             * Set color support for this `Console` instance. Setting to true enables coloring while inspecting
14
-             * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
15
-             * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
16
-             * respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
17
-             * @default 'auto'
18
-             */
19
-            colorMode?: boolean | "auto" | undefined;
20
-            /**
21
-             * Specifies options that are passed along to
22
-             * [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options).
23
-             */
24
-            inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
25
-            /**
26
-             * Set group indentation.
27
-             * @default 2
28
-             */
29
-            groupIndentation?: number | undefined;
30
-        }
31
-        interface Console {
32
-            readonly Console: {
33
-                prototype: Console;
34
-                new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
35
-                new(options: ConsoleOptions): Console;
36
-            };
37
-            assert(condition?: unknown, ...data: any[]): void;
38
-            clear(): void;
39
-            count(label?: string): void;
40
-            countReset(label?: string): void;
41
-            debug(...data: any[]): void;
42
-            dir(item?: any, options?: InspectOptions): void;
43
-            dirxml(...data: any[]): void;
44
-            error(...data: any[]): void;
45
-            group(...data: any[]): void;
46
-            groupCollapsed(...data: any[]): void;
47
-            groupEnd(): void;
48
-            info(...data: any[]): void;
49
-            log(...data: any[]): void;
50
-            table(tabularData?: any, properties?: string[]): void;
51
-            time(label?: string): void;
52
-            timeEnd(label?: string): void;
53
-            timeLog(label?: string, ...data: any[]): void;
54
-            trace(...data: any[]): void;
55
-            warn(...data: any[]): void;
56
-            /**
57
-             * This method does not display anything unless used in the inspector. The `console.profile()`
58
-             * method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
59
-             * is called. The profile is then added to the Profile panel of the inspector.
60
-             *
61
-             * ```js
62
-             * console.profile('MyLabel');
63
-             * // Some code
64
-             * console.profileEnd('MyLabel');
65
-             * // Adds the profile 'MyLabel' to the Profiles panel of the inspector.
66
-             * ```
67
-             * @since v8.0.0
68
-             */
69
-            profile(label?: string): void;
70
-            /**
71
-             * This method does not display anything unless used in the inspector. Stops the current
72
-             * JavaScript CPU profiling session if one has been started and prints the report to the
73
-             * Profiles panel of the inspector. See {@link profile} for an example.
74
-             *
75
-             * If this method is called without a label, the most recently started profile is stopped.
76
-             * @since v8.0.0
77
-             */
78
-            profileEnd(label?: string): void;
79
-            /**
80
-             * This method does not display anything unless used in the inspector. The `console.timeStamp()`
81
-             * method adds an event with the label `'label'` to the Timeline panel of the inspector.
82
-             * @since v8.0.0
83
-             */
84
-            timeStamp(label?: string): void;
85
-        }
86
-    }
87
-    var console: console.Console;
88
-    export = console;
89
-}
90
-declare module "console" {
91
-    import console = require("node:console");
92
-    export = console;
93
-}

+ 0 - 14
test/node_modules/@types/node/constants.d.ts

@@ -1,14 +0,0 @@
1
-declare module "node:constants" {
2
-    const constants:
3
-        & typeof import("node:os").constants.dlopen
4
-        & typeof import("node:os").constants.errno
5
-        & typeof import("node:os").constants.priority
6
-        & typeof import("node:os").constants.signals
7
-        & typeof import("node:fs").constants
8
-        & typeof import("node:crypto").constants;
9
-    export = constants;
10
-}
11
-declare module "constants" {
12
-    import constants = require("node:constants");
13
-    export = constants;
14
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 4058
test/node_modules/@types/node/crypto.d.ts


+ 0 - 537
test/node_modules/@types/node/dgram.d.ts

@@ -1,537 +0,0 @@
1
-declare module "node:dgram" {
2
-    import { NonSharedBuffer } from "node:buffer";
3
-    import * as dns from "node:dns";
4
-    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
5
-    import { AddressInfo, BlockList } from "node:net";
6
-    interface RemoteInfo {
7
-        address: string;
8
-        family: "IPv4" | "IPv6";
9
-        port: number;
10
-        size: number;
11
-    }
12
-    interface BindOptions {
13
-        port?: number | undefined;
14
-        address?: string | undefined;
15
-        exclusive?: boolean | undefined;
16
-        fd?: number | undefined;
17
-    }
18
-    type SocketType = "udp4" | "udp6";
19
-    interface SocketOptions extends Abortable {
20
-        type: SocketType;
21
-        reuseAddr?: boolean | undefined;
22
-        reusePort?: boolean | undefined;
23
-        /**
24
-         * @default false
25
-         */
26
-        ipv6Only?: boolean | undefined;
27
-        recvBufferSize?: number | undefined;
28
-        sendBufferSize?: number | undefined;
29
-        lookup?:
30
-            | ((
31
-                hostname: string,
32
-                options: dns.LookupOneOptions,
33
-                callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
34
-            ) => void)
35
-            | undefined;
36
-        receiveBlockList?: BlockList | undefined;
37
-        sendBlockList?: BlockList | undefined;
38
-    }
39
-    /**
40
-     * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram
41
-     * messages. When `address` and `port` are not passed to `socket.bind()` the
42
-     * method will bind the socket to the "all interfaces" address on a random port
43
-     * (it does the right thing for both `udp4` and `udp6` sockets). The bound address
44
-     * and port can be retrieved using `socket.address().address` and `socket.address().port`.
45
-     *
46
-     * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket:
47
-     *
48
-     * ```js
49
-     * const controller = new AbortController();
50
-     * const { signal } = controller;
51
-     * const server = dgram.createSocket({ type: 'udp4', signal });
52
-     * server.on('message', (msg, rinfo) => {
53
-     *   console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
54
-     * });
55
-     * // Later, when you want to close the server.
56
-     * controller.abort();
57
-     * ```
58
-     * @since v0.11.13
59
-     * @param options Available options are:
60
-     * @param callback Attached as a listener for `'message'` events. Optional.
61
-     */
62
-    function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
63
-    function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket;
64
-    interface SocketEventMap {
65
-        "close": [];
66
-        "connect": [];
67
-        "error": [err: Error];
68
-        "listening": [];
69
-        "message": [msg: NonSharedBuffer, rinfo: RemoteInfo];
70
-    }
71
-    /**
72
-     * Encapsulates the datagram functionality.
73
-     *
74
-     * New instances of `dgram.Socket` are created using {@link createSocket}.
75
-     * The `new` keyword is not to be used to create `dgram.Socket` instances.
76
-     * @since v0.1.99
77
-     */
78
-    class Socket implements EventEmitter {
79
-        /**
80
-         * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not
81
-         * specified, the operating system will choose
82
-         * one interface and will add membership to it. To add membership to every
83
-         * available interface, call `addMembership` multiple times, once per interface.
84
-         *
85
-         * When called on an unbound socket, this method will implicitly bind to a random
86
-         * port, listening on all interfaces.
87
-         *
88
-         * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur:
89
-         *
90
-         * ```js
91
-         * import cluster from 'node:cluster';
92
-         * import dgram from 'node:dgram';
93
-         *
94
-         * if (cluster.isPrimary) {
95
-         *   cluster.fork(); // Works ok.
96
-         *   cluster.fork(); // Fails with EADDRINUSE.
97
-         * } else {
98
-         *   const s = dgram.createSocket('udp4');
99
-         *   s.bind(1234, () => {
100
-         *     s.addMembership('224.0.0.114');
101
-         *   });
102
-         * }
103
-         * ```
104
-         * @since v0.6.9
105
-         */
106
-        addMembership(multicastAddress: string, multicastInterface?: string): void;
107
-        /**
108
-         * Returns an object containing the address information for a socket.
109
-         * For UDP sockets, this object will contain `address`, `family`, and `port` properties.
110
-         *
111
-         * This method throws `EBADF` if called on an unbound socket.
112
-         * @since v0.1.99
113
-         */
114
-        address(): AddressInfo;
115
-        /**
116
-         * For UDP sockets, causes the `dgram.Socket` to listen for datagram
117
-         * messages on a named `port` and optional `address`. If `port` is not
118
-         * specified or is `0`, the operating system will attempt to bind to a
119
-         * random port. If `address` is not specified, the operating system will
120
-         * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is
121
-         * called.
122
-         *
123
-         * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very
124
-         * useful.
125
-         *
126
-         * A bound datagram socket keeps the Node.js process running to receive
127
-         * datagram messages.
128
-         *
129
-         * If binding fails, an `'error'` event is generated. In rare case (e.g.
130
-         * attempting to bind with a closed socket), an `Error` may be thrown.
131
-         *
132
-         * Example of a UDP server listening on port 41234:
133
-         *
134
-         * ```js
135
-         * import dgram from 'node:dgram';
136
-         *
137
-         * const server = dgram.createSocket('udp4');
138
-         *
139
-         * server.on('error', (err) => {
140
-         *   console.error(`server error:\n${err.stack}`);
141
-         *   server.close();
142
-         * });
143
-         *
144
-         * server.on('message', (msg, rinfo) => {
145
-         *   console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
146
-         * });
147
-         *
148
-         * server.on('listening', () => {
149
-         *   const address = server.address();
150
-         *   console.log(`server listening ${address.address}:${address.port}`);
151
-         * });
152
-         *
153
-         * server.bind(41234);
154
-         * // Prints: server listening 0.0.0.0:41234
155
-         * ```
156
-         * @since v0.1.99
157
-         * @param callback with no parameters. Called when binding is complete.
158
-         */
159
-        bind(port?: number, address?: string, callback?: () => void): this;
160
-        bind(port?: number, callback?: () => void): this;
161
-        bind(callback?: () => void): this;
162
-        bind(options: BindOptions, callback?: () => void): this;
163
-        /**
164
-         * Close the underlying socket and stop listening for data on it. If a callback is
165
-         * provided, it is added as a listener for the `'close'` event.
166
-         * @since v0.1.99
167
-         * @param callback Called when the socket has been closed.
168
-         */
169
-        close(callback?: () => void): this;
170
-        /**
171
-         * Associates the `dgram.Socket` to a remote address and port. Every
172
-         * message sent by this handle is automatically sent to that destination. Also,
173
-         * the socket will only receive messages from that remote peer.
174
-         * Trying to call `connect()` on an already connected socket will result
175
-         * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not
176
-         * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets)
177
-         * will be used by default. Once the connection is complete, a `'connect'` event
178
-         * is emitted and the optional `callback` function is called. In case of failure,
179
-         * the `callback` is called or, failing this, an `'error'` event is emitted.
180
-         * @since v12.0.0
181
-         * @param callback Called when the connection is completed or on error.
182
-         */
183
-        connect(port: number, address?: string, callback?: () => void): void;
184
-        connect(port: number, callback: () => void): void;
185
-        /**
186
-         * A synchronous function that disassociates a connected `dgram.Socket` from
187
-         * its remote address. Trying to call `disconnect()` on an unbound or already
188
-         * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception.
189
-         * @since v12.0.0
190
-         */
191
-        disconnect(): void;
192
-        /**
193
-         * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the
194
-         * kernel when the socket is closed or the process terminates, so most apps will
195
-         * never have reason to call this.
196
-         *
197
-         * If `multicastInterface` is not specified, the operating system will attempt to
198
-         * drop membership on all valid interfaces.
199
-         * @since v0.6.9
200
-         */
201
-        dropMembership(multicastAddress: string, multicastInterface?: string): void;
202
-        /**
203
-         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
204
-         * @since v8.7.0
205
-         * @return the `SO_RCVBUF` socket receive buffer size in bytes.
206
-         */
207
-        getRecvBufferSize(): number;
208
-        /**
209
-         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
210
-         * @since v8.7.0
211
-         * @return the `SO_SNDBUF` socket send buffer size in bytes.
212
-         */
213
-        getSendBufferSize(): number;
214
-        /**
215
-         * @since v18.8.0, v16.19.0
216
-         * @return Number of bytes queued for sending.
217
-         */
218
-        getSendQueueSize(): number;
219
-        /**
220
-         * @since v18.8.0, v16.19.0
221
-         * @return Number of send requests currently in the queue awaiting to be processed.
222
-         */
223
-        getSendQueueCount(): number;
224
-        /**
225
-         * By default, binding a socket will cause it to block the Node.js process from
226
-         * exiting as long as the socket is open. The `socket.unref()` method can be used
227
-         * to exclude the socket from the reference counting that keeps the Node.js
228
-         * process active. The `socket.ref()` method adds the socket back to the reference
229
-         * counting and restores the default behavior.
230
-         *
231
-         * Calling `socket.ref()` multiples times will have no additional effect.
232
-         *
233
-         * The `socket.ref()` method returns a reference to the socket so calls can be
234
-         * chained.
235
-         * @since v0.9.1
236
-         */
237
-        ref(): this;
238
-        /**
239
-         * Returns an object containing the `address`, `family`, and `port` of the remote
240
-         * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception
241
-         * if the socket is not connected.
242
-         * @since v12.0.0
243
-         */
244
-        remoteAddress(): AddressInfo;
245
-        /**
246
-         * Broadcasts a datagram on the socket.
247
-         * For connectionless sockets, the destination `port` and `address` must be
248
-         * specified. Connected sockets, on the other hand, will use their associated
249
-         * remote endpoint, so the `port` and `address` arguments must not be set.
250
-         *
251
-         * The `msg` argument contains the message to be sent.
252
-         * Depending on its type, different behavior can apply. If `msg` is a `Buffer`,
253
-         * any `TypedArray` or a `DataView`,
254
-         * the `offset` and `length` specify the offset within the `Buffer` where the
255
-         * message begins and the number of bytes in the message, respectively.
256
-         * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that
257
-         * contain multi-byte characters, `offset` and `length` will be calculated with
258
-         * respect to `byte length` and not the character position.
259
-         * If `msg` is an array, `offset` and `length` must not be specified.
260
-         *
261
-         * The `address` argument is a string. If the value of `address` is a host name,
262
-         * DNS will be used to resolve the address of the host. If `address` is not
263
-         * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default.
264
-         *
265
-         * If the socket has not been previously bound with a call to `bind`, the socket
266
-         * is assigned a random port number and is bound to the "all interfaces" address
267
-         * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
268
-         *
269
-         * An optional `callback` function may be specified to as a way of reporting
270
-         * DNS errors or for determining when it is safe to reuse the `buf` object.
271
-         * DNS lookups delay the time to send for at least one tick of the
272
-         * Node.js event loop.
273
-         *
274
-         * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be
275
-         * passed as the first argument to the `callback`. If a `callback` is not given,
276
-         * the error is emitted as an `'error'` event on the `socket` object.
277
-         *
278
-         * Offset and length are optional but both _must_ be set if either are used.
279
-         * They are supported only when the first argument is a `Buffer`, a `TypedArray`,
280
-         * or a `DataView`.
281
-         *
282
-         * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket.
283
-         *
284
-         * Example of sending a UDP packet to a port on `localhost`;
285
-         *
286
-         * ```js
287
-         * import dgram from 'node:dgram';
288
-         * import { Buffer } from 'node:buffer';
289
-         *
290
-         * const message = Buffer.from('Some bytes');
291
-         * const client = dgram.createSocket('udp4');
292
-         * client.send(message, 41234, 'localhost', (err) => {
293
-         *   client.close();
294
-         * });
295
-         * ```
296
-         *
297
-         * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`;
298
-         *
299
-         * ```js
300
-         * import dgram from 'node:dgram';
301
-         * import { Buffer } from 'node:buffer';
302
-         *
303
-         * const buf1 = Buffer.from('Some ');
304
-         * const buf2 = Buffer.from('bytes');
305
-         * const client = dgram.createSocket('udp4');
306
-         * client.send([buf1, buf2], 41234, (err) => {
307
-         *   client.close();
308
-         * });
309
-         * ```
310
-         *
311
-         * Sending multiple buffers might be faster or slower depending on the
312
-         * application and operating system. Run benchmarks to
313
-         * determine the optimal strategy on a case-by-case basis. Generally speaking,
314
-         * however, sending multiple buffers is faster.
315
-         *
316
-         * Example of sending a UDP packet using a socket connected to a port on `localhost`:
317
-         *
318
-         * ```js
319
-         * import dgram from 'node:dgram';
320
-         * import { Buffer } from 'node:buffer';
321
-         *
322
-         * const message = Buffer.from('Some bytes');
323
-         * const client = dgram.createSocket('udp4');
324
-         * client.connect(41234, 'localhost', (err) => {
325
-         *   client.send(message, (err) => {
326
-         *     client.close();
327
-         *   });
328
-         * });
329
-         * ```
330
-         * @since v0.1.99
331
-         * @param msg Message to be sent.
332
-         * @param offset Offset in the buffer where the message starts.
333
-         * @param length Number of bytes in the message.
334
-         * @param port Destination port.
335
-         * @param address Destination host name or IP address.
336
-         * @param callback Called when the message has been sent.
337
-         */
338
-        send(
339
-            msg: string | NodeJS.ArrayBufferView | readonly any[],
340
-            port?: number,
341
-            address?: string,
342
-            callback?: (error: Error | null, bytes: number) => void,
343
-        ): void;
344
-        send(
345
-            msg: string | NodeJS.ArrayBufferView | readonly any[],
346
-            port?: number,
347
-            callback?: (error: Error | null, bytes: number) => void,
348
-        ): void;
349
-        send(
350
-            msg: string | NodeJS.ArrayBufferView | readonly any[],
351
-            callback?: (error: Error | null, bytes: number) => void,
352
-        ): void;
353
-        send(
354
-            msg: string | NodeJS.ArrayBufferView,
355
-            offset: number,
356
-            length: number,
357
-            port?: number,
358
-            address?: string,
359
-            callback?: (error: Error | null, bytes: number) => void,
360
-        ): void;
361
-        send(
362
-            msg: string | NodeJS.ArrayBufferView,
363
-            offset: number,
364
-            length: number,
365
-            port?: number,
366
-            callback?: (error: Error | null, bytes: number) => void,
367
-        ): void;
368
-        send(
369
-            msg: string | NodeJS.ArrayBufferView,
370
-            offset: number,
371
-            length: number,
372
-            callback?: (error: Error | null, bytes: number) => void,
373
-        ): void;
374
-        /**
375
-         * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP
376
-         * packets may be sent to a local interface's broadcast address.
377
-         *
378
-         * This method throws `EBADF` if called on an unbound socket.
379
-         * @since v0.6.9
380
-         */
381
-        setBroadcast(flag: boolean): void;
382
-        /**
383
-         * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
384
-         * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
385
-         * _with a scope index is written as `'IP%scope'` where scope is an interface name_
386
-         * _or interface number._
387
-         *
388
-         * Sets the default outgoing multicast interface of the socket to a chosen
389
-         * interface or back to system interface selection. The `multicastInterface` must
390
-         * be a valid string representation of an IP from the socket's family.
391
-         *
392
-         * For IPv4 sockets, this should be the IP configured for the desired physical
393
-         * interface. All packets sent to multicast on the socket will be sent on the
394
-         * interface determined by the most recent successful use of this call.
395
-         *
396
-         * For IPv6 sockets, `multicastInterface` should include a scope to indicate the
397
-         * interface as in the examples that follow. In IPv6, individual `send` calls can
398
-         * also use explicit scope in addresses, so only packets sent to a multicast
399
-         * address without specifying an explicit scope are affected by the most recent
400
-         * successful use of this call.
401
-         *
402
-         * This method throws `EBADF` if called on an unbound socket.
403
-         *
404
-         * #### Example: IPv6 outgoing multicast interface
405
-         *
406
-         * On most systems, where scope format uses the interface name:
407
-         *
408
-         * ```js
409
-         * const socket = dgram.createSocket('udp6');
410
-         *
411
-         * socket.bind(1234, () => {
412
-         *   socket.setMulticastInterface('::%eth1');
413
-         * });
414
-         * ```
415
-         *
416
-         * On Windows, where scope format uses an interface number:
417
-         *
418
-         * ```js
419
-         * const socket = dgram.createSocket('udp6');
420
-         *
421
-         * socket.bind(1234, () => {
422
-         *   socket.setMulticastInterface('::%2');
423
-         * });
424
-         * ```
425
-         *
426
-         * #### Example: IPv4 outgoing multicast interface
427
-         *
428
-         * All systems use an IP of the host on the desired physical interface:
429
-         *
430
-         * ```js
431
-         * const socket = dgram.createSocket('udp4');
432
-         *
433
-         * socket.bind(1234, () => {
434
-         *   socket.setMulticastInterface('10.0.0.2');
435
-         * });
436
-         * ```
437
-         * @since v8.6.0
438
-         */
439
-        setMulticastInterface(multicastInterface: string): void;
440
-        /**
441
-         * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`,
442
-         * multicast packets will also be received on the local interface.
443
-         *
444
-         * This method throws `EBADF` if called on an unbound socket.
445
-         * @since v0.3.8
446
-         */
447
-        setMulticastLoopback(flag: boolean): boolean;
448
-        /**
449
-         * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
450
-         * "Time to Live", in this context it specifies the number of IP hops that a
451
-         * packet is allowed to travel through, specifically for multicast traffic. Each
452
-         * router or gateway that forwards a packet decrements the TTL. If the TTL is
453
-         * decremented to 0 by a router, it will not be forwarded.
454
-         *
455
-         * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`.
456
-         *
457
-         * This method throws `EBADF` if called on an unbound socket.
458
-         * @since v0.3.8
459
-         */
460
-        setMulticastTTL(ttl: number): number;
461
-        /**
462
-         * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
463
-         * in bytes.
464
-         *
465
-         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
466
-         * @since v8.7.0
467
-         */
468
-        setRecvBufferSize(size: number): void;
469
-        /**
470
-         * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer
471
-         * in bytes.
472
-         *
473
-         * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket.
474
-         * @since v8.7.0
475
-         */
476
-        setSendBufferSize(size: number): void;
477
-        /**
478
-         * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live",
479
-         * in this context it specifies the number of IP hops that a packet is allowed to
480
-         * travel through. Each router or gateway that forwards a packet decrements the
481
-         * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded.
482
-         * Changing TTL values is typically done for network probes or when multicasting.
483
-         *
484
-         * The `ttl` argument may be between 1 and 255\. The default on most systems
485
-         * is 64.
486
-         *
487
-         * This method throws `EBADF` if called on an unbound socket.
488
-         * @since v0.1.101
489
-         */
490
-        setTTL(ttl: number): number;
491
-        /**
492
-         * By default, binding a socket will cause it to block the Node.js process from
493
-         * exiting as long as the socket is open. The `socket.unref()` method can be used
494
-         * to exclude the socket from the reference counting that keeps the Node.js
495
-         * process active, allowing the process to exit even if the socket is still
496
-         * listening.
497
-         *
498
-         * Calling `socket.unref()` multiple times will have no additional effect.
499
-         *
500
-         * The `socket.unref()` method returns a reference to the socket so calls can be
501
-         * chained.
502
-         * @since v0.9.1
503
-         */
504
-        unref(): this;
505
-        /**
506
-         * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket
507
-         * option. If the `multicastInterface` argument
508
-         * is not specified, the operating system will choose one interface and will add
509
-         * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface.
510
-         *
511
-         * When called on an unbound socket, this method will implicitly bind to a random
512
-         * port, listening on all interfaces.
513
-         * @since v13.1.0, v12.16.0
514
-         */
515
-        addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
516
-        /**
517
-         * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is
518
-         * automatically called by the kernel when the
519
-         * socket is closed or the process terminates, so most apps will never have
520
-         * reason to call this.
521
-         *
522
-         * If `multicastInterface` is not specified, the operating system will attempt to
523
-         * drop membership on all valid interfaces.
524
-         * @since v13.1.0, v12.16.0
525
-         */
526
-        dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
527
-        /**
528
-         * Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
529
-         * @since v20.5.0
530
-         */
531
-        [Symbol.asyncDispose](): Promise<void>;
532
-    }
533
-    interface Socket extends InternalEventEmitter<SocketEventMap> {}
534
-}
535
-declare module "dgram" {
536
-    export * from "node:dgram";
537
-}

+ 0 - 552
test/node_modules/@types/node/diagnostics_channel.d.ts

@@ -1,552 +0,0 @@
1
-declare module "node:diagnostics_channel" {
2
-    import { AsyncLocalStorage } from "node:async_hooks";
3
-    /**
4
-     * Check if there are active subscribers to the named channel. This is helpful if
5
-     * the message you want to send might be expensive to prepare.
6
-     *
7
-     * This API is optional but helpful when trying to publish messages from very
8
-     * performance-sensitive code.
9
-     *
10
-     * ```js
11
-     * import diagnostics_channel from 'node:diagnostics_channel';
12
-     *
13
-     * if (diagnostics_channel.hasSubscribers('my-channel')) {
14
-     *   // There are subscribers, prepare and publish message
15
-     * }
16
-     * ```
17
-     * @since v15.1.0, v14.17.0
18
-     * @param name The channel name
19
-     * @return If there are active subscribers
20
-     */
21
-    function hasSubscribers(name: string | symbol): boolean;
22
-    /**
23
-     * This is the primary entry-point for anyone wanting to publish to a named
24
-     * channel. It produces a channel object which is optimized to reduce overhead at
25
-     * publish time as much as possible.
26
-     *
27
-     * ```js
28
-     * import diagnostics_channel from 'node:diagnostics_channel';
29
-     *
30
-     * const channel = diagnostics_channel.channel('my-channel');
31
-     * ```
32
-     * @since v15.1.0, v14.17.0
33
-     * @param name The channel name
34
-     * @return The named channel object
35
-     */
36
-    function channel(name: string | symbol): Channel;
37
-    type ChannelListener = (message: unknown, name: string | symbol) => void;
38
-    /**
39
-     * Register a message handler to subscribe to this channel. This message handler
40
-     * will be run synchronously whenever a message is published to the channel. Any
41
-     * errors thrown in the message handler will trigger an `'uncaughtException'`.
42
-     *
43
-     * ```js
44
-     * import diagnostics_channel from 'node:diagnostics_channel';
45
-     *
46
-     * diagnostics_channel.subscribe('my-channel', (message, name) => {
47
-     *   // Received data
48
-     * });
49
-     * ```
50
-     * @since v18.7.0, v16.17.0
51
-     * @param name The channel name
52
-     * @param onMessage The handler to receive channel messages
53
-     */
54
-    function subscribe(name: string | symbol, onMessage: ChannelListener): void;
55
-    /**
56
-     * Remove a message handler previously registered to this channel with {@link subscribe}.
57
-     *
58
-     * ```js
59
-     * import diagnostics_channel from 'node:diagnostics_channel';
60
-     *
61
-     * function onMessage(message, name) {
62
-     *   // Received data
63
-     * }
64
-     *
65
-     * diagnostics_channel.subscribe('my-channel', onMessage);
66
-     *
67
-     * diagnostics_channel.unsubscribe('my-channel', onMessage);
68
-     * ```
69
-     * @since v18.7.0, v16.17.0
70
-     * @param name The channel name
71
-     * @param onMessage The previous subscribed handler to remove
72
-     * @return `true` if the handler was found, `false` otherwise.
73
-     */
74
-    function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
75
-    /**
76
-     * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing
77
-     * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`.
78
-     *
79
-     * ```js
80
-     * import diagnostics_channel from 'node:diagnostics_channel';
81
-     *
82
-     * const channelsByName = diagnostics_channel.tracingChannel('my-channel');
83
-     *
84
-     * // or...
85
-     *
86
-     * const channelsByCollection = diagnostics_channel.tracingChannel({
87
-     *   start: diagnostics_channel.channel('tracing:my-channel:start'),
88
-     *   end: diagnostics_channel.channel('tracing:my-channel:end'),
89
-     *   asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'),
90
-     *   asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'),
91
-     *   error: diagnostics_channel.channel('tracing:my-channel:error'),
92
-     * });
93
-     * ```
94
-     * @since v19.9.0
95
-     * @experimental
96
-     * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels`
97
-     * @return Collection of channels to trace with
98
-     */
99
-    function tracingChannel<
100
-        StoreType = unknown,
101
-        ContextType extends object = StoreType extends object ? StoreType : object,
102
-    >(
103
-        nameOrChannels: string | TracingChannelCollection<StoreType, ContextType>,
104
-    ): TracingChannel<StoreType, ContextType>;
105
-    /**
106
-     * The class `Channel` represents an individual named channel within the data
107
-     * pipeline. It is used to track subscribers and to publish messages when there
108
-     * are subscribers present. It exists as a separate object to avoid channel
109
-     * lookups at publish time, enabling very fast publish speeds and allowing
110
-     * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
111
-     * with `new Channel(name)` is not supported.
112
-     * @since v15.1.0, v14.17.0
113
-     */
114
-    class Channel<StoreType = unknown, ContextType = StoreType> {
115
-        readonly name: string | symbol;
116
-        /**
117
-         * Check if there are active subscribers to this channel. This is helpful if
118
-         * the message you want to send might be expensive to prepare.
119
-         *
120
-         * This API is optional but helpful when trying to publish messages from very
121
-         * performance-sensitive code.
122
-         *
123
-         * ```js
124
-         * import diagnostics_channel from 'node:diagnostics_channel';
125
-         *
126
-         * const channel = diagnostics_channel.channel('my-channel');
127
-         *
128
-         * if (channel.hasSubscribers) {
129
-         *   // There are subscribers, prepare and publish message
130
-         * }
131
-         * ```
132
-         * @since v15.1.0, v14.17.0
133
-         */
134
-        readonly hasSubscribers: boolean;
135
-        private constructor(name: string | symbol);
136
-        /**
137
-         * Publish a message to any subscribers to the channel. This will trigger
138
-         * message handlers synchronously so they will execute within the same context.
139
-         *
140
-         * ```js
141
-         * import diagnostics_channel from 'node:diagnostics_channel';
142
-         *
143
-         * const channel = diagnostics_channel.channel('my-channel');
144
-         *
145
-         * channel.publish({
146
-         *   some: 'message',
147
-         * });
148
-         * ```
149
-         * @since v15.1.0, v14.17.0
150
-         * @param message The message to send to the channel subscribers
151
-         */
152
-        publish(message: unknown): void;
153
-        /**
154
-         * Register a message handler to subscribe to this channel. This message handler
155
-         * will be run synchronously whenever a message is published to the channel. Any
156
-         * errors thrown in the message handler will trigger an `'uncaughtException'`.
157
-         *
158
-         * ```js
159
-         * import diagnostics_channel from 'node:diagnostics_channel';
160
-         *
161
-         * const channel = diagnostics_channel.channel('my-channel');
162
-         *
163
-         * channel.subscribe((message, name) => {
164
-         *   // Received data
165
-         * });
166
-         * ```
167
-         * @since v15.1.0, v14.17.0
168
-         * @param onMessage The handler to receive channel messages
169
-         */
170
-        subscribe(onMessage: ChannelListener): void;
171
-        /**
172
-         * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
173
-         *
174
-         * ```js
175
-         * import diagnostics_channel from 'node:diagnostics_channel';
176
-         *
177
-         * const channel = diagnostics_channel.channel('my-channel');
178
-         *
179
-         * function onMessage(message, name) {
180
-         *   // Received data
181
-         * }
182
-         *
183
-         * channel.subscribe(onMessage);
184
-         *
185
-         * channel.unsubscribe(onMessage);
186
-         * ```
187
-         * @since v15.1.0, v14.17.0
188
-         * @param onMessage The previous subscribed handler to remove
189
-         * @return `true` if the handler was found, `false` otherwise.
190
-         */
191
-        unsubscribe(onMessage: ChannelListener): void;
192
-        /**
193
-         * When `channel.runStores(context, ...)` is called, the given context data
194
-         * will be applied to any store bound to the channel. If the store has already been
195
-         * bound the previous `transform` function will be replaced with the new one.
196
-         * The `transform` function may be omitted to set the given context data as the
197
-         * context directly.
198
-         *
199
-         * ```js
200
-         * import diagnostics_channel from 'node:diagnostics_channel';
201
-         * import { AsyncLocalStorage } from 'node:async_hooks';
202
-         *
203
-         * const store = new AsyncLocalStorage();
204
-         *
205
-         * const channel = diagnostics_channel.channel('my-channel');
206
-         *
207
-         * channel.bindStore(store, (data) => {
208
-         *   return { data };
209
-         * });
210
-         * ```
211
-         * @since v19.9.0
212
-         * @experimental
213
-         * @param store The store to which to bind the context data
214
-         * @param transform Transform context data before setting the store context
215
-         */
216
-        bindStore(store: AsyncLocalStorage<StoreType>, transform?: (context: ContextType) => StoreType): void;
217
-        /**
218
-         * Remove a message handler previously registered to this channel with `channel.bindStore(store)`.
219
-         *
220
-         * ```js
221
-         * import diagnostics_channel from 'node:diagnostics_channel';
222
-         * import { AsyncLocalStorage } from 'node:async_hooks';
223
-         *
224
-         * const store = new AsyncLocalStorage();
225
-         *
226
-         * const channel = diagnostics_channel.channel('my-channel');
227
-         *
228
-         * channel.bindStore(store);
229
-         * channel.unbindStore(store);
230
-         * ```
231
-         * @since v19.9.0
232
-         * @experimental
233
-         * @param store The store to unbind from the channel.
234
-         * @return `true` if the store was found, `false` otherwise.
235
-         */
236
-        unbindStore(store: AsyncLocalStorage<StoreType>): boolean;
237
-        /**
238
-         * Applies the given data to any AsyncLocalStorage instances bound to the channel
239
-         * for the duration of the given function, then publishes to the channel within
240
-         * the scope of that data is applied to the stores.
241
-         *
242
-         * If a transform function was given to `channel.bindStore(store)` it will be
243
-         * applied to transform the message data before it becomes the context value for
244
-         * the store. The prior storage context is accessible from within the transform
245
-         * function in cases where context linking is required.
246
-         *
247
-         * The context applied to the store should be accessible in any async code which
248
-         * continues from execution which began during the given function, however
249
-         * there are some situations in which `context loss` may occur.
250
-         *
251
-         * ```js
252
-         * import diagnostics_channel from 'node:diagnostics_channel';
253
-         * import { AsyncLocalStorage } from 'node:async_hooks';
254
-         *
255
-         * const store = new AsyncLocalStorage();
256
-         *
257
-         * const channel = diagnostics_channel.channel('my-channel');
258
-         *
259
-         * channel.bindStore(store, (message) => {
260
-         *   const parent = store.getStore();
261
-         *   return new Span(message, parent);
262
-         * });
263
-         * channel.runStores({ some: 'message' }, () => {
264
-         *   store.getStore(); // Span({ some: 'message' })
265
-         * });
266
-         * ```
267
-         * @since v19.9.0
268
-         * @experimental
269
-         * @param context Message to send to subscribers and bind to stores
270
-         * @param fn Handler to run within the entered storage context
271
-         * @param thisArg The receiver to be used for the function call.
272
-         * @param args Optional arguments to pass to the function.
273
-         */
274
-        runStores<ThisArg = any, Args extends any[] = any[], Result = any>(
275
-            context: ContextType,
276
-            fn: (this: ThisArg, ...args: Args) => Result,
277
-            thisArg?: ThisArg,
278
-            ...args: Args
279
-        ): Result;
280
-    }
281
-    interface TracingChannelSubscribers<ContextType extends object> {
282
-        start: (message: ContextType) => void;
283
-        end: (
284
-            message: ContextType & {
285
-                error?: unknown;
286
-                result?: unknown;
287
-            },
288
-        ) => void;
289
-        asyncStart: (
290
-            message: ContextType & {
291
-                error?: unknown;
292
-                result?: unknown;
293
-            },
294
-        ) => void;
295
-        asyncEnd: (
296
-            message: ContextType & {
297
-                error?: unknown;
298
-                result?: unknown;
299
-            },
300
-        ) => void;
301
-        error: (
302
-            message: ContextType & {
303
-                error: unknown;
304
-            },
305
-        ) => void;
306
-    }
307
-    interface TracingChannelCollection<StoreType = unknown, ContextType = StoreType> {
308
-        start: Channel<StoreType, ContextType>;
309
-        end: Channel<StoreType, ContextType>;
310
-        asyncStart: Channel<StoreType, ContextType>;
311
-        asyncEnd: Channel<StoreType, ContextType>;
312
-        error: Channel<StoreType, ContextType>;
313
-    }
314
-    /**
315
-     * The class `TracingChannel` is a collection of `TracingChannel Channels` which
316
-     * together express a single traceable action. It is used to formalize and
317
-     * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a
318
-     * single `TracingChannel` at the top-level of the file rather than creating them
319
-     * dynamically.
320
-     * @since v19.9.0
321
-     * @experimental
322
-     */
323
-    class TracingChannel<StoreType = unknown, ContextType extends object = {}> implements TracingChannelCollection {
324
-        start: Channel<StoreType, ContextType>;
325
-        end: Channel<StoreType, ContextType>;
326
-        asyncStart: Channel<StoreType, ContextType>;
327
-        asyncEnd: Channel<StoreType, ContextType>;
328
-        error: Channel<StoreType, ContextType>;
329
-        /**
330
-         * Helper to subscribe a collection of functions to the corresponding channels.
331
-         * This is the same as calling `channel.subscribe(onMessage)` on each channel
332
-         * individually.
333
-         *
334
-         * ```js
335
-         * import diagnostics_channel from 'node:diagnostics_channel';
336
-         *
337
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
338
-         *
339
-         * channels.subscribe({
340
-         *   start(message) {
341
-         *     // Handle start message
342
-         *   },
343
-         *   end(message) {
344
-         *     // Handle end message
345
-         *   },
346
-         *   asyncStart(message) {
347
-         *     // Handle asyncStart message
348
-         *   },
349
-         *   asyncEnd(message) {
350
-         *     // Handle asyncEnd message
351
-         *   },
352
-         *   error(message) {
353
-         *     // Handle error message
354
-         *   },
355
-         * });
356
-         * ```
357
-         * @since v19.9.0
358
-         * @experimental
359
-         * @param subscribers Set of `TracingChannel Channels` subscribers
360
-         */
361
-        subscribe(subscribers: TracingChannelSubscribers<ContextType>): void;
362
-        /**
363
-         * Helper to unsubscribe a collection of functions from the corresponding channels.
364
-         * This is the same as calling `channel.unsubscribe(onMessage)` on each channel
365
-         * individually.
366
-         *
367
-         * ```js
368
-         * import diagnostics_channel from 'node:diagnostics_channel';
369
-         *
370
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
371
-         *
372
-         * channels.unsubscribe({
373
-         *   start(message) {
374
-         *     // Handle start message
375
-         *   },
376
-         *   end(message) {
377
-         *     // Handle end message
378
-         *   },
379
-         *   asyncStart(message) {
380
-         *     // Handle asyncStart message
381
-         *   },
382
-         *   asyncEnd(message) {
383
-         *     // Handle asyncEnd message
384
-         *   },
385
-         *   error(message) {
386
-         *     // Handle error message
387
-         *   },
388
-         * });
389
-         * ```
390
-         * @since v19.9.0
391
-         * @experimental
392
-         * @param subscribers Set of `TracingChannel Channels` subscribers
393
-         * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise.
394
-         */
395
-        unsubscribe(subscribers: TracingChannelSubscribers<ContextType>): void;
396
-        /**
397
-         * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error.
398
-         * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
399
-         * events should have any bound stores set to match this trace context.
400
-         *
401
-         * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
402
-         * which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
403
-         *
404
-         * ```js
405
-         * import diagnostics_channel from 'node:diagnostics_channel';
406
-         *
407
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
408
-         *
409
-         * channels.traceSync(() => {
410
-         *   // Do something
411
-         * }, {
412
-         *   some: 'thing',
413
-         * });
414
-         * ```
415
-         * @since v19.9.0
416
-         * @experimental
417
-         * @param fn Function to wrap a trace around
418
-         * @param context Shared object to correlate events through
419
-         * @param thisArg The receiver to be used for the function call
420
-         * @param args Optional arguments to pass to the function
421
-         * @return The return value of the given function
422
-         */
423
-        traceSync<ThisArg = any, Args extends any[] = any[], Result = any>(
424
-            fn: (this: ThisArg, ...args: Args) => Result,
425
-            context?: ContextType,
426
-            thisArg?: ThisArg,
427
-            ...args: Args
428
-        ): Result;
429
-        /**
430
-         * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the
431
-         * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also
432
-         * produce an `error event` if the given function throws an error or the
433
-         * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
434
-         * events should have any bound stores set to match this trace context.
435
-         *
436
-         * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
437
-         * which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
438
-         *
439
-         * ```js
440
-         * import diagnostics_channel from 'node:diagnostics_channel';
441
-         *
442
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
443
-         *
444
-         * channels.tracePromise(async () => {
445
-         *   // Do something
446
-         * }, {
447
-         *   some: 'thing',
448
-         * });
449
-         * ```
450
-         * @since v19.9.0
451
-         * @experimental
452
-         * @param fn Promise-returning function to wrap a trace around
453
-         * @param context Shared object to correlate trace events through
454
-         * @param thisArg The receiver to be used for the function call
455
-         * @param args Optional arguments to pass to the function
456
-         * @return Chained from promise returned by the given function
457
-         */
458
-        tracePromise<ThisArg = any, Args extends any[] = any[], Result = any>(
459
-            fn: (this: ThisArg, ...args: Args) => Promise<Result>,
460
-            context?: ContextType,
461
-            thisArg?: ThisArg,
462
-            ...args: Args
463
-        ): Promise<Result>;
464
-        /**
465
-         * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the
466
-         * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or
467
-         * the returned
468
-         * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
469
-         * events should have any bound stores set to match this trace context.
470
-         *
471
-         * The `position` will be -1 by default to indicate the final argument should
472
-         * be used as the callback.
473
-         *
474
-         * ```js
475
-         * import diagnostics_channel from 'node:diagnostics_channel';
476
-         *
477
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
478
-         *
479
-         * channels.traceCallback((arg1, callback) => {
480
-         *   // Do something
481
-         *   callback(null, 'result');
482
-         * }, 1, {
483
-         *   some: 'thing',
484
-         * }, thisArg, arg1, callback);
485
-         * ```
486
-         *
487
-         * The callback will also be run with `channel.runStores(context, ...)` which
488
-         * enables context loss recovery in some cases.
489
-         *
490
-         * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
491
-         * which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
492
-         *
493
-         * ```js
494
-         * import diagnostics_channel from 'node:diagnostics_channel';
495
-         * import { AsyncLocalStorage } from 'node:async_hooks';
496
-         *
497
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
498
-         * const myStore = new AsyncLocalStorage();
499
-         *
500
-         * // The start channel sets the initial store data to something
501
-         * // and stores that store data value on the trace context object
502
-         * channels.start.bindStore(myStore, (data) => {
503
-         *   const span = new Span(data);
504
-         *   data.span = span;
505
-         *   return span;
506
-         * });
507
-         *
508
-         * // Then asyncStart can restore from that data it stored previously
509
-         * channels.asyncStart.bindStore(myStore, (data) => {
510
-         *   return data.span;
511
-         * });
512
-         * ```
513
-         * @since v19.9.0
514
-         * @experimental
515
-         * @param fn callback using function to wrap a trace around
516
-         * @param position Zero-indexed argument position of expected callback
517
-         * @param context Shared object to correlate trace events through
518
-         * @param thisArg The receiver to be used for the function call
519
-         * @param args Optional arguments to pass to the function
520
-         * @return The return value of the given function
521
-         */
522
-        traceCallback<ThisArg = any, Args extends any[] = any[], Result = any>(
523
-            fn: (this: ThisArg, ...args: Args) => Result,
524
-            position?: number,
525
-            context?: ContextType,
526
-            thisArg?: ThisArg,
527
-            ...args: Args
528
-        ): Result;
529
-        /**
530
-         * `true` if any of the individual channels has a subscriber, `false` if not.
531
-         *
532
-         * This is a helper method available on a {@link TracingChannel} instance to check
533
-         * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers.
534
-         * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise.
535
-         *
536
-         * ```js
537
-         * const diagnostics_channel = require('node:diagnostics_channel');
538
-         *
539
-         * const channels = diagnostics_channel.tracingChannel('my-channel');
540
-         *
541
-         * if (channels.hasSubscribers) {
542
-         *   // Do something
543
-         * }
544
-         * ```
545
-         * @since v22.0.0, v20.13.0
546
-         */
547
-        readonly hasSubscribers: boolean;
548
-    }
549
-}
550
-declare module "diagnostics_channel" {
551
-    export * from "node:diagnostics_channel";
552
-}

+ 0 - 876
test/node_modules/@types/node/dns.d.ts

@@ -1,876 +0,0 @@
1
-declare module "node:dns" {
2
-    // Supported getaddrinfo flags.
3
-    /**
4
-     * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
5
-     * only returned if the current system has at least one IPv4 address configured.
6
-     */
7
-    const ADDRCONFIG: number;
8
-    /**
9
-     * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
10
-     * on some operating systems (e.g. FreeBSD 10.1).
11
-     */
12
-    const V4MAPPED: number;
13
-    /**
14
-     * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
15
-     * well as IPv4 mapped IPv6 addresses.
16
-     */
17
-    const ALL: number;
18
-    interface LookupOptions {
19
-        /**
20
-         * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
21
-         * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
22
-         * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.
23
-         * @default 0
24
-         */
25
-        family?: number | "IPv4" | "IPv6" | undefined;
26
-        /**
27
-         * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
28
-         * passed by bitwise `OR`ing their values.
29
-         */
30
-        hints?: number | undefined;
31
-        /**
32
-         * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address.
33
-         * @default false
34
-         */
35
-        all?: boolean | undefined;
36
-        /**
37
-         * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
38
-         * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
39
-         * addresses before IPv4 addresses. Default value is configurable using
40
-         * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder).
41
-         * @default `verbatim` (addresses are not reordered)
42
-         * @since v22.1.0
43
-         */
44
-        order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
45
-        /**
46
-         * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
47
-         * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
48
-         * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
49
-         * @default true (addresses are not reordered)
50
-         * @deprecated Please use `order` option
51
-         */
52
-        verbatim?: boolean | undefined;
53
-    }
54
-    interface LookupOneOptions extends LookupOptions {
55
-        all?: false | undefined;
56
-    }
57
-    interface LookupAllOptions extends LookupOptions {
58
-        all: true;
59
-    }
60
-    interface LookupAddress {
61
-        /**
62
-         * A string representation of an IPv4 or IPv6 address.
63
-         */
64
-        address: string;
65
-        /**
66
-         * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a
67
-         * bug in the name resolution service used by the operating system.
68
-         */
69
-        family: number;
70
-    }
71
-    /**
72
-     * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
73
-     * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
74
-     * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
75
-     * IPv4 and IPv6 addresses are both returned if found.
76
-     *
77
-     * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the
78
-     * properties `address` and `family`.
79
-     *
80
-     * On error, `err` is an `Error` object, where `err.code` is the error code.
81
-     * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
82
-     * the host name does not exist but also when the lookup fails in other ways
83
-     * such as no available file descriptors.
84
-     *
85
-     * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
86
-     * The implementation uses an operating system facility that can associate names
87
-     * with addresses and vice versa. This implementation can have subtle but
88
-     * important consequences on the behavior of any Node.js program. Please take some
89
-     * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations)
90
-     * before using `dns.lookup()`.
91
-     *
92
-     * Example usage:
93
-     *
94
-     * ```js
95
-     * import dns from 'node:dns';
96
-     * const options = {
97
-     *   family: 6,
98
-     *   hints: dns.ADDRCONFIG | dns.V4MAPPED,
99
-     * };
100
-     * dns.lookup('example.com', options, (err, address, family) =>
101
-     *   console.log('address: %j family: IPv%s', address, family));
102
-     * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
103
-     *
104
-     * // When options.all is true, the result will be an Array.
105
-     * options.all = true;
106
-     * dns.lookup('example.com', options, (err, addresses) =>
107
-     *   console.log('addresses: %j', addresses));
108
-     * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
109
-     * ```
110
-     *
111
-     * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
112
-     * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
113
-     * @since v0.1.90
114
-     */
115
-    function lookup(
116
-        hostname: string,
117
-        family: number,
118
-        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
119
-    ): void;
120
-    function lookup(
121
-        hostname: string,
122
-        options: LookupOneOptions,
123
-        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
124
-    ): void;
125
-    function lookup(
126
-        hostname: string,
127
-        options: LookupAllOptions,
128
-        callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
129
-    ): void;
130
-    function lookup(
131
-        hostname: string,
132
-        options: LookupOptions,
133
-        callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
134
-    ): void;
135
-    function lookup(
136
-        hostname: string,
137
-        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
138
-    ): void;
139
-    namespace lookup {
140
-        function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
141
-        function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
142
-        function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
143
-    }
144
-    /**
145
-     * Resolves the given `address` and `port` into a host name and service using
146
-     * the operating system's underlying `getnameinfo` implementation.
147
-     *
148
-     * If `address` is not a valid IP address, a `TypeError` will be thrown.
149
-     * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
150
-     *
151
-     * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
152
-     * where `err.code` is the error code.
153
-     *
154
-     * ```js
155
-     * import dns from 'node:dns';
156
-     * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
157
-     *   console.log(hostname, service);
158
-     *   // Prints: localhost ssh
159
-     * });
160
-     * ```
161
-     *
162
-     * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
163
-     * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
164
-     * @since v0.11.14
165
-     */
166
-    function lookupService(
167
-        address: string,
168
-        port: number,
169
-        callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
170
-    ): void;
171
-    namespace lookupService {
172
-        function __promisify__(
173
-            address: string,
174
-            port: number,
175
-        ): Promise<{
176
-            hostname: string;
177
-            service: string;
178
-        }>;
179
-    }
180
-    interface ResolveOptions {
181
-        ttl: boolean;
182
-    }
183
-    interface ResolveWithTtlOptions extends ResolveOptions {
184
-        ttl: true;
185
-    }
186
-    interface RecordWithTtl {
187
-        address: string;
188
-        ttl: number;
189
-    }
190
-    interface AnyARecord extends RecordWithTtl {
191
-        type: "A";
192
-    }
193
-    interface AnyAaaaRecord extends RecordWithTtl {
194
-        type: "AAAA";
195
-    }
196
-    interface CaaRecord {
197
-        critical: number;
198
-        issue?: string | undefined;
199
-        issuewild?: string | undefined;
200
-        iodef?: string | undefined;
201
-        contactemail?: string | undefined;
202
-        contactphone?: string | undefined;
203
-    }
204
-    interface AnyCaaRecord extends CaaRecord {
205
-        type: "CAA";
206
-    }
207
-    interface MxRecord {
208
-        priority: number;
209
-        exchange: string;
210
-    }
211
-    interface AnyMxRecord extends MxRecord {
212
-        type: "MX";
213
-    }
214
-    interface NaptrRecord {
215
-        flags: string;
216
-        service: string;
217
-        regexp: string;
218
-        replacement: string;
219
-        order: number;
220
-        preference: number;
221
-    }
222
-    interface AnyNaptrRecord extends NaptrRecord {
223
-        type: "NAPTR";
224
-    }
225
-    interface SoaRecord {
226
-        nsname: string;
227
-        hostmaster: string;
228
-        serial: number;
229
-        refresh: number;
230
-        retry: number;
231
-        expire: number;
232
-        minttl: number;
233
-    }
234
-    interface AnySoaRecord extends SoaRecord {
235
-        type: "SOA";
236
-    }
237
-    interface SrvRecord {
238
-        priority: number;
239
-        weight: number;
240
-        port: number;
241
-        name: string;
242
-    }
243
-    interface AnySrvRecord extends SrvRecord {
244
-        type: "SRV";
245
-    }
246
-    interface TlsaRecord {
247
-        certUsage: number;
248
-        selector: number;
249
-        match: number;
250
-        data: ArrayBuffer;
251
-    }
252
-    interface AnyTlsaRecord extends TlsaRecord {
253
-        type: "TLSA";
254
-    }
255
-    interface AnyTxtRecord {
256
-        type: "TXT";
257
-        entries: string[];
258
-    }
259
-    interface AnyNsRecord {
260
-        type: "NS";
261
-        value: string;
262
-    }
263
-    interface AnyPtrRecord {
264
-        type: "PTR";
265
-        value: string;
266
-    }
267
-    interface AnyCnameRecord {
268
-        type: "CNAME";
269
-        value: string;
270
-    }
271
-    type AnyRecord =
272
-        | AnyARecord
273
-        | AnyAaaaRecord
274
-        | AnyCaaRecord
275
-        | AnyCnameRecord
276
-        | AnyMxRecord
277
-        | AnyNaptrRecord
278
-        | AnyNsRecord
279
-        | AnyPtrRecord
280
-        | AnySoaRecord
281
-        | AnySrvRecord
282
-        | AnyTlsaRecord
283
-        | AnyTxtRecord;
284
-    /**
285
-     * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
286
-     * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource
287
-     * records. The type and structure of individual results varies based on `rrtype`:
288
-     *
289
-     * <omitted>
290
-     *
291
-     * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
292
-     * where `err.code` is one of the `DNS error codes`.
293
-     * @since v0.1.27
294
-     * @param hostname Host name to resolve.
295
-     * @param [rrtype='A'] Resource record type.
296
-     */
297
-    function resolve(
298
-        hostname: string,
299
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
300
-    ): void;
301
-    function resolve(
302
-        hostname: string,
303
-        rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
304
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
305
-    ): void;
306
-    function resolve(
307
-        hostname: string,
308
-        rrtype: "ANY",
309
-        callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
310
-    ): void;
311
-    function resolve(
312
-        hostname: string,
313
-        rrtype: "CAA",
314
-        callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
315
-    ): void;
316
-    function resolve(
317
-        hostname: string,
318
-        rrtype: "MX",
319
-        callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
320
-    ): void;
321
-    function resolve(
322
-        hostname: string,
323
-        rrtype: "NAPTR",
324
-        callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
325
-    ): void;
326
-    function resolve(
327
-        hostname: string,
328
-        rrtype: "SOA",
329
-        callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
330
-    ): void;
331
-    function resolve(
332
-        hostname: string,
333
-        rrtype: "SRV",
334
-        callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
335
-    ): void;
336
-    function resolve(
337
-        hostname: string,
338
-        rrtype: "TLSA",
339
-        callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
340
-    ): void;
341
-    function resolve(
342
-        hostname: string,
343
-        rrtype: "TXT",
344
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
345
-    ): void;
346
-    function resolve(
347
-        hostname: string,
348
-        rrtype: string,
349
-        callback: (
350
-            err: NodeJS.ErrnoException | null,
351
-            addresses:
352
-                | string[]
353
-                | CaaRecord[]
354
-                | MxRecord[]
355
-                | NaptrRecord[]
356
-                | SoaRecord
357
-                | SrvRecord[]
358
-                | TlsaRecord[]
359
-                | string[][]
360
-                | AnyRecord[],
361
-        ) => void,
362
-    ): void;
363
-    namespace resolve {
364
-        function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
365
-        function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
366
-        function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
367
-        function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
368
-        function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
369
-        function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
370
-        function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
371
-        function __promisify__(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
372
-        function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
373
-        function __promisify__(
374
-            hostname: string,
375
-            rrtype: string,
376
-        ): Promise<
377
-            | string[]
378
-            | CaaRecord[]
379
-            | MxRecord[]
380
-            | NaptrRecord[]
381
-            | SoaRecord
382
-            | SrvRecord[]
383
-            | TlsaRecord[]
384
-            | string[][]
385
-            | AnyRecord[]
386
-        >;
387
-    }
388
-    /**
389
-     * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function
390
-     * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
391
-     * @since v0.1.16
392
-     * @param hostname Host name to resolve.
393
-     */
394
-    function resolve4(
395
-        hostname: string,
396
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
397
-    ): void;
398
-    function resolve4(
399
-        hostname: string,
400
-        options: ResolveWithTtlOptions,
401
-        callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
402
-    ): void;
403
-    function resolve4(
404
-        hostname: string,
405
-        options: ResolveOptions,
406
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
407
-    ): void;
408
-    namespace resolve4 {
409
-        function __promisify__(hostname: string): Promise<string[]>;
410
-        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
411
-        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
412
-    }
413
-    /**
414
-     * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function
415
-     * will contain an array of IPv6 addresses.
416
-     * @since v0.1.16
417
-     * @param hostname Host name to resolve.
418
-     */
419
-    function resolve6(
420
-        hostname: string,
421
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
422
-    ): void;
423
-    function resolve6(
424
-        hostname: string,
425
-        options: ResolveWithTtlOptions,
426
-        callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
427
-    ): void;
428
-    function resolve6(
429
-        hostname: string,
430
-        options: ResolveOptions,
431
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
432
-    ): void;
433
-    namespace resolve6 {
434
-        function __promisify__(hostname: string): Promise<string[]>;
435
-        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
436
-        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
437
-    }
438
-    /**
439
-     * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function
440
-     * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
441
-     * @since v0.3.2
442
-     */
443
-    function resolveCname(
444
-        hostname: string,
445
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
446
-    ): void;
447
-    namespace resolveCname {
448
-        function __promisify__(hostname: string): Promise<string[]>;
449
-    }
450
-    /**
451
-     * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function
452
-     * will contain an array of certification authority authorization records
453
-     * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
454
-     * @since v15.0.0, v14.17.0
455
-     */
456
-    function resolveCaa(
457
-        hostname: string,
458
-        callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
459
-    ): void;
460
-    namespace resolveCaa {
461
-        function __promisify__(hostname: string): Promise<CaaRecord[]>;
462
-    }
463
-    /**
464
-     * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
465
-     * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
466
-     * @since v0.1.27
467
-     */
468
-    function resolveMx(
469
-        hostname: string,
470
-        callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
471
-    ): void;
472
-    namespace resolveMx {
473
-        function __promisify__(hostname: string): Promise<MxRecord[]>;
474
-    }
475
-    /**
476
-     * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of
477
-     * objects with the following properties:
478
-     *
479
-     * * `flags`
480
-     * * `service`
481
-     * * `regexp`
482
-     * * `replacement`
483
-     * * `order`
484
-     * * `preference`
485
-     *
486
-     * ```js
487
-     * {
488
-     *   flags: 's',
489
-     *   service: 'SIP+D2U',
490
-     *   regexp: '',
491
-     *   replacement: '_sip._udp.example.com',
492
-     *   order: 30,
493
-     *   preference: 100
494
-     * }
495
-     * ```
496
-     * @since v0.9.12
497
-     */
498
-    function resolveNaptr(
499
-        hostname: string,
500
-        callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
501
-    ): void;
502
-    namespace resolveNaptr {
503
-        function __promisify__(hostname: string): Promise<NaptrRecord[]>;
504
-    }
505
-    /**
506
-     * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
507
-     * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
508
-     * @since v0.1.90
509
-     */
510
-    function resolveNs(
511
-        hostname: string,
512
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
513
-    ): void;
514
-    namespace resolveNs {
515
-        function __promisify__(hostname: string): Promise<string[]>;
516
-    }
517
-    /**
518
-     * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
519
-     * be an array of strings containing the reply records.
520
-     * @since v6.0.0
521
-     */
522
-    function resolvePtr(
523
-        hostname: string,
524
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
525
-    ): void;
526
-    namespace resolvePtr {
527
-        function __promisify__(hostname: string): Promise<string[]>;
528
-    }
529
-    /**
530
-     * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
531
-     * the `hostname`. The `address` argument passed to the `callback` function will
532
-     * be an object with the following properties:
533
-     *
534
-     * * `nsname`
535
-     * * `hostmaster`
536
-     * * `serial`
537
-     * * `refresh`
538
-     * * `retry`
539
-     * * `expire`
540
-     * * `minttl`
541
-     *
542
-     * ```js
543
-     * {
544
-     *   nsname: 'ns.example.com',
545
-     *   hostmaster: 'root.example.com',
546
-     *   serial: 2013101809,
547
-     *   refresh: 10000,
548
-     *   retry: 2400,
549
-     *   expire: 604800,
550
-     *   minttl: 3600
551
-     * }
552
-     * ```
553
-     * @since v0.11.10
554
-     */
555
-    function resolveSoa(
556
-        hostname: string,
557
-        callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
558
-    ): void;
559
-    namespace resolveSoa {
560
-        function __promisify__(hostname: string): Promise<SoaRecord>;
561
-    }
562
-    /**
563
-     * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will
564
-     * be an array of objects with the following properties:
565
-     *
566
-     * * `priority`
567
-     * * `weight`
568
-     * * `port`
569
-     * * `name`
570
-     *
571
-     * ```js
572
-     * {
573
-     *   priority: 10,
574
-     *   weight: 5,
575
-     *   port: 21223,
576
-     *   name: 'service.example.com'
577
-     * }
578
-     * ```
579
-     * @since v0.1.27
580
-     */
581
-    function resolveSrv(
582
-        hostname: string,
583
-        callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
584
-    ): void;
585
-    namespace resolveSrv {
586
-        function __promisify__(hostname: string): Promise<SrvRecord[]>;
587
-    }
588
-    /**
589
-     * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
590
-     * the `hostname`. The `records` argument passed to the `callback` function is an
591
-     * array of objects with these properties:
592
-     *
593
-     * * `certUsage`
594
-     * * `selector`
595
-     * * `match`
596
-     * * `data`
597
-     *
598
-     * ```js
599
-     * {
600
-     *   certUsage: 3,
601
-     *   selector: 1,
602
-     *   match: 1,
603
-     *   data: [ArrayBuffer]
604
-     * }
605
-     * ```
606
-     * @since v23.9.0, v22.15.0
607
-     */
608
-    function resolveTlsa(
609
-        hostname: string,
610
-        callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
611
-    ): void;
612
-    namespace resolveTlsa {
613
-        function __promisify__(hostname: string): Promise<TlsaRecord[]>;
614
-    }
615
-    /**
616
-     * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a
617
-     * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
618
-     * one record. Depending on the use case, these could be either joined together or
619
-     * treated separately.
620
-     * @since v0.1.27
621
-     */
622
-    function resolveTxt(
623
-        hostname: string,
624
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
625
-    ): void;
626
-    namespace resolveTxt {
627
-        function __promisify__(hostname: string): Promise<string[][]>;
628
-    }
629
-    /**
630
-     * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
631
-     * The `ret` argument passed to the `callback` function will be an array containing
632
-     * various types of records. Each object has a property `type` that indicates the
633
-     * type of the current record. And depending on the `type`, additional properties
634
-     * will be present on the object:
635
-     *
636
-     * <omitted>
637
-     *
638
-     * Here is an example of the `ret` object passed to the callback:
639
-     *
640
-     * ```js
641
-     * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
642
-     *   { type: 'CNAME', value: 'example.com' },
643
-     *   { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
644
-     *   { type: 'NS', value: 'ns1.example.com' },
645
-     *   { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
646
-     *   { type: 'SOA',
647
-     *     nsname: 'ns1.example.com',
648
-     *     hostmaster: 'admin.example.com',
649
-     *     serial: 156696742,
650
-     *     refresh: 900,
651
-     *     retry: 900,
652
-     *     expire: 1800,
653
-     *     minttl: 60 } ]
654
-     * ```
655
-     *
656
-     * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
657
-     * [RFC 8482](https://tools.ietf.org/html/rfc8482).
658
-     */
659
-    function resolveAny(
660
-        hostname: string,
661
-        callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
662
-    ): void;
663
-    namespace resolveAny {
664
-        function __promisify__(hostname: string): Promise<AnyRecord[]>;
665
-    }
666
-    /**
667
-     * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
668
-     * array of host names.
669
-     *
670
-     * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is
671
-     * one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes).
672
-     * @since v0.1.16
673
-     */
674
-    function reverse(
675
-        ip: string,
676
-        callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
677
-    ): void;
678
-    /**
679
-     * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
680
-     * The value could be:
681
-     *
682
-     * * `ipv4first`: for `order` defaulting to `ipv4first`.
683
-     * * `ipv6first`: for `order` defaulting to `ipv6first`.
684
-     * * `verbatim`: for `order` defaulting to `verbatim`.
685
-     * @since v18.17.0
686
-     */
687
-    function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
688
-    /**
689
-     * Sets the IP address and port of servers to be used when performing DNS
690
-     * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
691
-     * addresses. If the port is the IANA default DNS port (53) it can be omitted.
692
-     *
693
-     * ```js
694
-     * dns.setServers([
695
-     *   '4.4.4.4',
696
-     *   '[2001:4860:4860::8888]',
697
-     *   '4.4.4.4:1053',
698
-     *   '[2001:4860:4860::8888]:1053',
699
-     * ]);
700
-     * ```
701
-     *
702
-     * An error will be thrown if an invalid address is provided.
703
-     *
704
-     * The `dns.setServers()` method must not be called while a DNS query is in
705
-     * progress.
706
-     *
707
-     * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
708
-     *
709
-     * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
710
-     * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
711
-     * subsequent servers provided. Fallback DNS servers will only be used if the
712
-     * earlier ones time out or result in some other error.
713
-     * @since v0.11.3
714
-     * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
715
-     */
716
-    function setServers(servers: readonly string[]): void;
717
-    /**
718
-     * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
719
-     * that are currently configured for DNS resolution. A string will include a port
720
-     * section if a custom port is used.
721
-     *
722
-     * ```js
723
-     * [
724
-     *   '4.4.4.4',
725
-     *   '2001:4860:4860::8888',
726
-     *   '4.4.4.4:1053',
727
-     *   '[2001:4860:4860::8888]:1053',
728
-     * ]
729
-     * ```
730
-     * @since v0.11.3
731
-     */
732
-    function getServers(): string[];
733
-    /**
734
-     * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
735
-     * The value could be:
736
-     *
737
-     * * `ipv4first`: sets default `order` to `ipv4first`.
738
-     * * `ipv6first`: sets default `order` to `ipv6first`.
739
-     * * `verbatim`: sets default `order` to `verbatim`.
740
-     *
741
-     * The default is `verbatim` and {@link setDefaultResultOrder} have higher
742
-     * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using
743
-     * [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
744
-     * thread won't affect the default dns orders in workers.
745
-     * @since v16.4.0, v14.18.0
746
-     * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
747
-     */
748
-    function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
749
-    // Error codes
750
-    const NODATA: "ENODATA";
751
-    const FORMERR: "EFORMERR";
752
-    const SERVFAIL: "ESERVFAIL";
753
-    const NOTFOUND: "ENOTFOUND";
754
-    const NOTIMP: "ENOTIMP";
755
-    const REFUSED: "EREFUSED";
756
-    const BADQUERY: "EBADQUERY";
757
-    const BADNAME: "EBADNAME";
758
-    const BADFAMILY: "EBADFAMILY";
759
-    const BADRESP: "EBADRESP";
760
-    const CONNREFUSED: "ECONNREFUSED";
761
-    const TIMEOUT: "ETIMEOUT";
762
-    const EOF: "EOF";
763
-    const FILE: "EFILE";
764
-    const NOMEM: "ENOMEM";
765
-    const DESTRUCTION: "EDESTRUCTION";
766
-    const BADSTR: "EBADSTR";
767
-    const BADFLAGS: "EBADFLAGS";
768
-    const NONAME: "ENONAME";
769
-    const BADHINTS: "EBADHINTS";
770
-    const NOTINITIALIZED: "ENOTINITIALIZED";
771
-    const LOADIPHLPAPI: "ELOADIPHLPAPI";
772
-    const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
773
-    const CANCELLED: "ECANCELLED";
774
-    interface ResolverOptions {
775
-        /**
776
-         * Query timeout in milliseconds, or `-1` to use the default timeout.
777
-         */
778
-        timeout?: number | undefined;
779
-        /**
780
-         * The number of tries the resolver will try contacting each name server before giving up.
781
-         * @default 4
782
-         */
783
-        tries?: number | undefined;
784
-        /**
785
-         * The max retry timeout, in milliseconds.
786
-         * @default 0
787
-         */
788
-        maxTimeout?: number | undefined;
789
-    }
790
-    /**
791
-     * An independent resolver for DNS requests.
792
-     *
793
-     * Creating a new resolver uses the default server settings. Setting
794
-     * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect
795
-     * other resolvers:
796
-     *
797
-     * ```js
798
-     * import { Resolver } from 'node:dns';
799
-     * const resolver = new Resolver();
800
-     * resolver.setServers(['4.4.4.4']);
801
-     *
802
-     * // This request will use the server at 4.4.4.4, independent of global settings.
803
-     * resolver.resolve4('example.org', (err, addresses) => {
804
-     *   // ...
805
-     * });
806
-     * ```
807
-     *
808
-     * The following methods from the `node:dns` module are available:
809
-     *
810
-     * * `resolver.getServers()`
811
-     * * `resolver.resolve()`
812
-     * * `resolver.resolve4()`
813
-     * * `resolver.resolve6()`
814
-     * * `resolver.resolveAny()`
815
-     * * `resolver.resolveCaa()`
816
-     * * `resolver.resolveCname()`
817
-     * * `resolver.resolveMx()`
818
-     * * `resolver.resolveNaptr()`
819
-     * * `resolver.resolveNs()`
820
-     * * `resolver.resolvePtr()`
821
-     * * `resolver.resolveSoa()`
822
-     * * `resolver.resolveSrv()`
823
-     * * `resolver.resolveTxt()`
824
-     * * `resolver.reverse()`
825
-     * * `resolver.setServers()`
826
-     * @since v8.3.0
827
-     */
828
-    class Resolver {
829
-        constructor(options?: ResolverOptions);
830
-        /**
831
-         * Cancel all outstanding DNS queries made by this resolver. The corresponding
832
-         * callbacks will be called with an error with code `ECANCELLED`.
833
-         * @since v8.3.0
834
-         */
835
-        cancel(): void;
836
-        getServers: typeof getServers;
837
-        resolve: typeof resolve;
838
-        resolve4: typeof resolve4;
839
-        resolve6: typeof resolve6;
840
-        resolveAny: typeof resolveAny;
841
-        resolveCaa: typeof resolveCaa;
842
-        resolveCname: typeof resolveCname;
843
-        resolveMx: typeof resolveMx;
844
-        resolveNaptr: typeof resolveNaptr;
845
-        resolveNs: typeof resolveNs;
846
-        resolvePtr: typeof resolvePtr;
847
-        resolveSoa: typeof resolveSoa;
848
-        resolveSrv: typeof resolveSrv;
849
-        resolveTlsa: typeof resolveTlsa;
850
-        resolveTxt: typeof resolveTxt;
851
-        reverse: typeof reverse;
852
-        /**
853
-         * The resolver instance will send its requests from the specified IP address.
854
-         * This allows programs to specify outbound interfaces when used on multi-homed
855
-         * systems.
856
-         *
857
-         * If a v4 or v6 address is not specified, it is set to the default and the
858
-         * operating system will choose a local address automatically.
859
-         *
860
-         * The resolver will use the v4 local address when making requests to IPv4 DNS
861
-         * servers, and the v6 local address when making requests to IPv6 DNS servers.
862
-         * The `rrtype` of resolution requests has no impact on the local address used.
863
-         * @since v15.1.0, v14.17.0
864
-         * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
865
-         * @param [ipv6='::0'] A string representation of an IPv6 address.
866
-         */
867
-        setLocalAddress(ipv4?: string, ipv6?: string): void;
868
-        setServers: typeof setServers;
869
-    }
870
-}
871
-declare module "node:dns" {
872
-    export * as promises from "node:dns/promises";
873
-}
874
-declare module "dns" {
875
-    export * from "node:dns";
876
-}

+ 0 - 497
test/node_modules/@types/node/dns/promises.d.ts

@@ -1,497 +0,0 @@
1
-declare module "node:dns/promises" {
2
-    import {
3
-        AnyRecord,
4
-        CaaRecord,
5
-        LookupAddress,
6
-        LookupAllOptions,
7
-        LookupOneOptions,
8
-        LookupOptions,
9
-        MxRecord,
10
-        NaptrRecord,
11
-        RecordWithTtl,
12
-        ResolveOptions,
13
-        ResolverOptions,
14
-        ResolveWithTtlOptions,
15
-        SoaRecord,
16
-        SrvRecord,
17
-        TlsaRecord,
18
-    } from "node:dns";
19
-    /**
20
-     * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
21
-     * that are currently configured for DNS resolution. A string will include a port
22
-     * section if a custom port is used.
23
-     *
24
-     * ```js
25
-     * [
26
-     *   '4.4.4.4',
27
-     *   '2001:4860:4860::8888',
28
-     *   '4.4.4.4:1053',
29
-     *   '[2001:4860:4860::8888]:1053',
30
-     * ]
31
-     * ```
32
-     * @since v10.6.0
33
-     */
34
-    function getServers(): string[];
35
-    /**
36
-     * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
37
-     * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
38
-     * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
39
-     * and IPv6 addresses are both returned if found.
40
-     *
41
-     * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`.
42
-     *
43
-     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
44
-     * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
45
-     * the host name does not exist but also when the lookup fails in other ways
46
-     * such as no available file descriptors.
47
-     *
48
-     * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS
49
-     * protocol. The implementation uses an operating system facility that can
50
-     * associate names with addresses and vice versa. This implementation can have
51
-     * subtle but important consequences on the behavior of any Node.js program. Please
52
-     * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before
53
-     * using `dnsPromises.lookup()`.
54
-     *
55
-     * Example usage:
56
-     *
57
-     * ```js
58
-     * import dns from 'node:dns';
59
-     * const dnsPromises = dns.promises;
60
-     * const options = {
61
-     *   family: 6,
62
-     *   hints: dns.ADDRCONFIG | dns.V4MAPPED,
63
-     * };
64
-     *
65
-     * dnsPromises.lookup('example.com', options).then((result) => {
66
-     *   console.log('address: %j family: IPv%s', result.address, result.family);
67
-     *   // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
68
-     * });
69
-     *
70
-     * // When options.all is true, the result will be an Array.
71
-     * options.all = true;
72
-     * dnsPromises.lookup('example.com', options).then((result) => {
73
-     *   console.log('addresses: %j', result);
74
-     *   // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
75
-     * });
76
-     * ```
77
-     * @since v10.6.0
78
-     */
79
-    function lookup(hostname: string, family: number): Promise<LookupAddress>;
80
-    function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
81
-    function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
82
-    function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
83
-    function lookup(hostname: string): Promise<LookupAddress>;
84
-    /**
85
-     * Resolves the given `address` and `port` into a host name and service using
86
-     * the operating system's underlying `getnameinfo` implementation.
87
-     *
88
-     * If `address` is not a valid IP address, a `TypeError` will be thrown.
89
-     * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
90
-     *
91
-     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code.
92
-     *
93
-     * ```js
94
-     * import dnsPromises from 'node:dns';
95
-     * dnsPromises.lookupService('127.0.0.1', 22).then((result) => {
96
-     *   console.log(result.hostname, result.service);
97
-     *   // Prints: localhost ssh
98
-     * });
99
-     * ```
100
-     * @since v10.6.0
101
-     */
102
-    function lookupService(
103
-        address: string,
104
-        port: number,
105
-    ): Promise<{
106
-        hostname: string;
107
-        service: string;
108
-    }>;
109
-    /**
110
-     * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
111
-     * of the resource records. When successful, the `Promise` is resolved with an
112
-     * array of resource records. The type and structure of individual results vary
113
-     * based on `rrtype`:
114
-     *
115
-     * <omitted>
116
-     *
117
-     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
118
-     * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
119
-     * @since v10.6.0
120
-     * @param hostname Host name to resolve.
121
-     * @param [rrtype='A'] Resource record type.
122
-     */
123
-    function resolve(hostname: string): Promise<string[]>;
124
-    function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
125
-    function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
126
-    function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
127
-    function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
128
-    function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
129
-    function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
130
-    function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
131
-    function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
132
-    function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
133
-    function resolve(hostname: string, rrtype: string): Promise<
134
-        | string[]
135
-        | CaaRecord[]
136
-        | MxRecord[]
137
-        | NaptrRecord[]
138
-        | SoaRecord
139
-        | SrvRecord[]
140
-        | TlsaRecord[]
141
-        | string[][]
142
-        | AnyRecord[]
143
-    >;
144
-    /**
145
-     * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
146
-     * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
147
-     * @since v10.6.0
148
-     * @param hostname Host name to resolve.
149
-     */
150
-    function resolve4(hostname: string): Promise<string[]>;
151
-    function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
152
-    function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
153
-    /**
154
-     * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6
155
-     * addresses.
156
-     * @since v10.6.0
157
-     * @param hostname Host name to resolve.
158
-     */
159
-    function resolve6(hostname: string): Promise<string[]>;
160
-    function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
161
-    function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
162
-    /**
163
-     * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
164
-     * On success, the `Promise` is resolved with an array containing various types of
165
-     * records. Each object has a property `type` that indicates the type of the
166
-     * current record. And depending on the `type`, additional properties will be
167
-     * present on the object:
168
-     *
169
-     * <omitted>
170
-     *
171
-     * Here is an example of the result object:
172
-     *
173
-     * ```js
174
-     * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
175
-     *   { type: 'CNAME', value: 'example.com' },
176
-     *   { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
177
-     *   { type: 'NS', value: 'ns1.example.com' },
178
-     *   { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
179
-     *   { type: 'SOA',
180
-     *     nsname: 'ns1.example.com',
181
-     *     hostmaster: 'admin.example.com',
182
-     *     serial: 156696742,
183
-     *     refresh: 900,
184
-     *     retry: 900,
185
-     *     expire: 1800,
186
-     *     minttl: 60 } ]
187
-     * ```
188
-     * @since v10.6.0
189
-     */
190
-    function resolveAny(hostname: string): Promise<AnyRecord[]>;
191
-    /**
192
-     * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success,
193
-     * the `Promise` is resolved with an array of objects containing available
194
-     * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`).
195
-     * @since v15.0.0, v14.17.0
196
-     */
197
-    function resolveCaa(hostname: string): Promise<CaaRecord[]>;
198
-    /**
199
-     * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success,
200
-     * the `Promise` is resolved with an array of canonical name records available for
201
-     * the `hostname` (e.g. `['bar.example.com']`).
202
-     * @since v10.6.0
203
-     */
204
-    function resolveCname(hostname: string): Promise<string[]>;
205
-    /**
206
-     * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects
207
-     * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`).
208
-     * @since v10.6.0
209
-     */
210
-    function resolveMx(hostname: string): Promise<MxRecord[]>;
211
-    /**
212
-     * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array
213
-     * of objects with the following properties:
214
-     *
215
-     * * `flags`
216
-     * * `service`
217
-     * * `regexp`
218
-     * * `replacement`
219
-     * * `order`
220
-     * * `preference`
221
-     *
222
-     * ```js
223
-     * {
224
-     *   flags: 's',
225
-     *   service: 'SIP+D2U',
226
-     *   regexp: '',
227
-     *   replacement: '_sip._udp.example.com',
228
-     *   order: 30,
229
-     *   preference: 100
230
-     * }
231
-     * ```
232
-     * @since v10.6.0
233
-     */
234
-    function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
235
-    /**
236
-     * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server
237
-     * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`).
238
-     * @since v10.6.0
239
-     */
240
-    function resolveNs(hostname: string): Promise<string[]>;
241
-    /**
242
-     * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings
243
-     * containing the reply records.
244
-     * @since v10.6.0
245
-     */
246
-    function resolvePtr(hostname: string): Promise<string[]>;
247
-    /**
248
-     * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
249
-     * the `hostname`. On success, the `Promise` is resolved with an object with the
250
-     * following properties:
251
-     *
252
-     * * `nsname`
253
-     * * `hostmaster`
254
-     * * `serial`
255
-     * * `refresh`
256
-     * * `retry`
257
-     * * `expire`
258
-     * * `minttl`
259
-     *
260
-     * ```js
261
-     * {
262
-     *   nsname: 'ns.example.com',
263
-     *   hostmaster: 'root.example.com',
264
-     *   serial: 2013101809,
265
-     *   refresh: 10000,
266
-     *   retry: 2400,
267
-     *   expire: 604800,
268
-     *   minttl: 3600
269
-     * }
270
-     * ```
271
-     * @since v10.6.0
272
-     */
273
-    function resolveSoa(hostname: string): Promise<SoaRecord>;
274
-    /**
275
-     * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with
276
-     * the following properties:
277
-     *
278
-     * * `priority`
279
-     * * `weight`
280
-     * * `port`
281
-     * * `name`
282
-     *
283
-     * ```js
284
-     * {
285
-     *   priority: 10,
286
-     *   weight: 5,
287
-     *   port: 21223,
288
-     *   name: 'service.example.com'
289
-     * }
290
-     * ```
291
-     * @since v10.6.0
292
-     */
293
-    function resolveSrv(hostname: string): Promise<SrvRecord[]>;
294
-    /**
295
-     * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
296
-     * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions
297
-     * with these properties:
298
-     *
299
-     * * `certUsage`
300
-     * * `selector`
301
-     * * `match`
302
-     * * `data`
303
-     *
304
-     * ```js
305
-     * {
306
-     *   certUsage: 3,
307
-     *   selector: 1,
308
-     *   match: 1,
309
-     *   data: [ArrayBuffer]
310
-     * }
311
-     * ```
312
-     * @since v23.9.0, v22.15.0
313
-     */
314
-    function resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
315
-    /**
316
-     * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
317
-     * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
318
-     * one record. Depending on the use case, these could be either joined together or
319
-     * treated separately.
320
-     * @since v10.6.0
321
-     */
322
-    function resolveTxt(hostname: string): Promise<string[][]>;
323
-    /**
324
-     * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
325
-     * array of host names.
326
-     *
327
-     * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code`
328
-     * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
329
-     * @since v10.6.0
330
-     */
331
-    function reverse(ip: string): Promise<string[]>;
332
-    /**
333
-     * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
334
-     * The value could be:
335
-     *
336
-     * * `ipv4first`: for `verbatim` defaulting to `false`.
337
-     * * `verbatim`: for `verbatim` defaulting to `true`.
338
-     * @since v20.1.0
339
-     */
340
-    function getDefaultResultOrder(): "ipv4first" | "verbatim";
341
-    /**
342
-     * Sets the IP address and port of servers to be used when performing DNS
343
-     * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
344
-     * addresses. If the port is the IANA default DNS port (53) it can be omitted.
345
-     *
346
-     * ```js
347
-     * dnsPromises.setServers([
348
-     *   '4.4.4.4',
349
-     *   '[2001:4860:4860::8888]',
350
-     *   '4.4.4.4:1053',
351
-     *   '[2001:4860:4860::8888]:1053',
352
-     * ]);
353
-     * ```
354
-     *
355
-     * An error will be thrown if an invalid address is provided.
356
-     *
357
-     * The `dnsPromises.setServers()` method must not be called while a DNS query is in
358
-     * progress.
359
-     *
360
-     * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
361
-     * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
362
-     * subsequent servers provided. Fallback DNS servers will only be used if the
363
-     * earlier ones time out or result in some other error.
364
-     * @since v10.6.0
365
-     * @param servers array of `RFC 5952` formatted addresses
366
-     */
367
-    function setServers(servers: readonly string[]): void;
368
-    /**
369
-     * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be:
370
-     *
371
-     * * `ipv4first`: sets default `order` to `ipv4first`.
372
-     * * `ipv6first`: sets default `order` to `ipv6first`.
373
-     * * `verbatim`: sets default `order` to `verbatim`.
374
-     *
375
-     * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
376
-     * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
377
-     * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
378
-     * from the main thread won't affect the default dns orders in workers.
379
-     * @since v16.4.0, v14.18.0
380
-     * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
381
-     */
382
-    function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
383
-    // Error codes
384
-    const NODATA: "ENODATA";
385
-    const FORMERR: "EFORMERR";
386
-    const SERVFAIL: "ESERVFAIL";
387
-    const NOTFOUND: "ENOTFOUND";
388
-    const NOTIMP: "ENOTIMP";
389
-    const REFUSED: "EREFUSED";
390
-    const BADQUERY: "EBADQUERY";
391
-    const BADNAME: "EBADNAME";
392
-    const BADFAMILY: "EBADFAMILY";
393
-    const BADRESP: "EBADRESP";
394
-    const CONNREFUSED: "ECONNREFUSED";
395
-    const TIMEOUT: "ETIMEOUT";
396
-    const EOF: "EOF";
397
-    const FILE: "EFILE";
398
-    const NOMEM: "ENOMEM";
399
-    const DESTRUCTION: "EDESTRUCTION";
400
-    const BADSTR: "EBADSTR";
401
-    const BADFLAGS: "EBADFLAGS";
402
-    const NONAME: "ENONAME";
403
-    const BADHINTS: "EBADHINTS";
404
-    const NOTINITIALIZED: "ENOTINITIALIZED";
405
-    const LOADIPHLPAPI: "ELOADIPHLPAPI";
406
-    const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
407
-    const CANCELLED: "ECANCELLED";
408
-
409
-    /**
410
-     * An independent resolver for DNS requests.
411
-     *
412
-     * Creating a new resolver uses the default server settings. Setting
413
-     * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect
414
-     * other resolvers:
415
-     *
416
-     * ```js
417
-     * import { promises } from 'node:dns';
418
-     * const resolver = new promises.Resolver();
419
-     * resolver.setServers(['4.4.4.4']);
420
-     *
421
-     * // This request will use the server at 4.4.4.4, independent of global settings.
422
-     * resolver.resolve4('example.org').then((addresses) => {
423
-     *   // ...
424
-     * });
425
-     *
426
-     * // Alternatively, the same code can be written using async-await style.
427
-     * (async function() {
428
-     *   const addresses = await resolver.resolve4('example.org');
429
-     * })();
430
-     * ```
431
-     *
432
-     * The following methods from the `dnsPromises` API are available:
433
-     *
434
-     * * `resolver.getServers()`
435
-     * * `resolver.resolve()`
436
-     * * `resolver.resolve4()`
437
-     * * `resolver.resolve6()`
438
-     * * `resolver.resolveAny()`
439
-     * * `resolver.resolveCaa()`
440
-     * * `resolver.resolveCname()`
441
-     * * `resolver.resolveMx()`
442
-     * * `resolver.resolveNaptr()`
443
-     * * `resolver.resolveNs()`
444
-     * * `resolver.resolvePtr()`
445
-     * * `resolver.resolveSoa()`
446
-     * * `resolver.resolveSrv()`
447
-     * * `resolver.resolveTxt()`
448
-     * * `resolver.reverse()`
449
-     * * `resolver.setServers()`
450
-     * @since v10.6.0
451
-     */
452
-    class Resolver {
453
-        constructor(options?: ResolverOptions);
454
-        /**
455
-         * Cancel all outstanding DNS queries made by this resolver. The corresponding
456
-         * callbacks will be called with an error with code `ECANCELLED`.
457
-         * @since v8.3.0
458
-         */
459
-        cancel(): void;
460
-        getServers: typeof getServers;
461
-        resolve: typeof resolve;
462
-        resolve4: typeof resolve4;
463
-        resolve6: typeof resolve6;
464
-        resolveAny: typeof resolveAny;
465
-        resolveCaa: typeof resolveCaa;
466
-        resolveCname: typeof resolveCname;
467
-        resolveMx: typeof resolveMx;
468
-        resolveNaptr: typeof resolveNaptr;
469
-        resolveNs: typeof resolveNs;
470
-        resolvePtr: typeof resolvePtr;
471
-        resolveSoa: typeof resolveSoa;
472
-        resolveSrv: typeof resolveSrv;
473
-        resolveTlsa: typeof resolveTlsa;
474
-        resolveTxt: typeof resolveTxt;
475
-        reverse: typeof reverse;
476
-        /**
477
-         * The resolver instance will send its requests from the specified IP address.
478
-         * This allows programs to specify outbound interfaces when used on multi-homed
479
-         * systems.
480
-         *
481
-         * If a v4 or v6 address is not specified, it is set to the default and the
482
-         * operating system will choose a local address automatically.
483
-         *
484
-         * The resolver will use the v4 local address when making requests to IPv4 DNS
485
-         * servers, and the v6 local address when making requests to IPv6 DNS servers.
486
-         * The `rrtype` of resolution requests has no impact on the local address used.
487
-         * @since v15.1.0, v14.17.0
488
-         * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
489
-         * @param [ipv6='::0'] A string representation of an IPv6 address.
490
-         */
491
-        setLocalAddress(ipv4?: string, ipv6?: string): void;
492
-        setServers: typeof setServers;
493
-    }
494
-}
495
-declare module "dns/promises" {
496
-    export * from "node:dns/promises";
497
-}

+ 0 - 150
test/node_modules/@types/node/domain.d.ts

@@ -1,150 +0,0 @@
1
-declare module "node:domain" {
2
-    import { EventEmitter } from "node:events";
3
-    /**
4
-     * The `Domain` class encapsulates the functionality of routing errors and
5
-     * uncaught exceptions to the active `Domain` object.
6
-     *
7
-     * To handle the errors that it catches, listen to its `'error'` event.
8
-     */
9
-    class Domain extends EventEmitter {
10
-        /**
11
-         * An array of event emitters that have been explicitly added to the domain.
12
-         */
13
-        members: EventEmitter[];
14
-        /**
15
-         * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly
16
-         * pushes the domain onto the domain
17
-         * stack managed by the domain module (see {@link exit} for details on the
18
-         * domain stack). The call to `enter()` delimits the beginning of a chain of
19
-         * asynchronous calls and I/O operations bound to a domain.
20
-         *
21
-         * Calling `enter()` changes only the active domain, and does not alter the domain
22
-         * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
23
-         * single domain.
24
-         */
25
-        enter(): void;
26
-        /**
27
-         * The `exit()` method exits the current domain, popping it off the domain stack.
28
-         * Any time execution is going to switch to the context of a different chain of
29
-         * asynchronous calls, it's important to ensure that the current domain is exited.
30
-         * The call to `exit()` delimits either the end of or an interruption to the chain
31
-         * of asynchronous calls and I/O operations bound to a domain.
32
-         *
33
-         * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain.
34
-         *
35
-         * Calling `exit()` changes only the active domain, and does not alter the domain
36
-         * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
37
-         * single domain.
38
-         */
39
-        exit(): void;
40
-        /**
41
-         * Run the supplied function in the context of the domain, implicitly
42
-         * binding all event emitters, timers, and low-level requests that are
43
-         * created in that context. Optionally, arguments can be passed to
44
-         * the function.
45
-         *
46
-         * This is the most basic way to use a domain.
47
-         *
48
-         * ```js
49
-         * import domain from 'node:domain';
50
-         * import fs from 'node:fs';
51
-         * const d = domain.create();
52
-         * d.on('error', (er) => {
53
-         *   console.error('Caught error!', er);
54
-         * });
55
-         * d.run(() => {
56
-         *   process.nextTick(() => {
57
-         *     setTimeout(() => { // Simulating some various async stuff
58
-         *       fs.open('non-existent file', 'r', (er, fd) => {
59
-         *         if (er) throw er;
60
-         *         // proceed...
61
-         *       });
62
-         *     }, 100);
63
-         *   });
64
-         * });
65
-         * ```
66
-         *
67
-         * In this example, the `d.on('error')` handler will be triggered, rather
68
-         * than crashing the program.
69
-         */
70
-        run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
71
-        /**
72
-         * Explicitly adds an emitter to the domain. If any event handlers called by
73
-         * the emitter throw an error, or if the emitter emits an `'error'` event, it
74
-         * will be routed to the domain's `'error'` event, just like with implicit
75
-         * binding.
76
-         *
77
-         * If the `EventEmitter` was already bound to a domain, it is removed from that
78
-         * one, and bound to this one instead.
79
-         * @param emitter emitter to be added to the domain
80
-         */
81
-        add(emitter: EventEmitter): void;
82
-        /**
83
-         * The opposite of {@link add}. Removes domain handling from the
84
-         * specified emitter.
85
-         * @param emitter emitter to be removed from the domain
86
-         */
87
-        remove(emitter: EventEmitter): void;
88
-        /**
89
-         * The returned function will be a wrapper around the supplied callback
90
-         * function. When the returned function is called, any errors that are
91
-         * thrown will be routed to the domain's `'error'` event.
92
-         *
93
-         * ```js
94
-         * const d = domain.create();
95
-         *
96
-         * function readSomeFile(filename, cb) {
97
-         *   fs.readFile(filename, 'utf8', d.bind((er, data) => {
98
-         *     // If this throws, it will also be passed to the domain.
99
-         *     return cb(er, data ? JSON.parse(data) : null);
100
-         *   }));
101
-         * }
102
-         *
103
-         * d.on('error', (er) => {
104
-         *   // An error occurred somewhere. If we throw it now, it will crash the program
105
-         *   // with the normal line number and stack message.
106
-         * });
107
-         * ```
108
-         * @param callback The callback function
109
-         * @return The bound function
110
-         */
111
-        bind<T extends Function>(callback: T): T;
112
-        /**
113
-         * This method is almost identical to {@link bind}. However, in
114
-         * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
115
-         *
116
-         * In this way, the common `if (err) return callback(err);` pattern can be replaced
117
-         * with a single error handler in a single place.
118
-         *
119
-         * ```js
120
-         * const d = domain.create();
121
-         *
122
-         * function readSomeFile(filename, cb) {
123
-         *   fs.readFile(filename, 'utf8', d.intercept((data) => {
124
-         *     // Note, the first argument is never passed to the
125
-         *     // callback since it is assumed to be the 'Error' argument
126
-         *     // and thus intercepted by the domain.
127
-         *
128
-         *     // If this throws, it will also be passed to the domain
129
-         *     // so the error-handling logic can be moved to the 'error'
130
-         *     // event on the domain instead of being repeated throughout
131
-         *     // the program.
132
-         *     return cb(null, JSON.parse(data));
133
-         *   }));
134
-         * }
135
-         *
136
-         * d.on('error', (er) => {
137
-         *   // An error occurred somewhere. If we throw it now, it will crash the program
138
-         *   // with the normal line number and stack message.
139
-         * });
140
-         * ```
141
-         * @param callback The callback function
142
-         * @return The intercepted function
143
-         */
144
-        intercept<T extends Function>(callback: T): T;
145
-    }
146
-    function create(): Domain;
147
-}
148
-declare module "domain" {
149
-    export * from "node:domain";
150
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 1008
test/node_modules/@types/node/events.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 0 - 4780
test/node_modules/@types/node/fs.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 0 - 1468
test/node_modules/@types/node/fs/promises.d.ts


+ 0 - 150
test/node_modules/@types/node/globals.d.ts

@@ -1,150 +0,0 @@
1
-declare var global: typeof globalThis;
2
-
3
-declare var process: NodeJS.Process;
4
-
5
-interface ErrorConstructor {
6
-    /**
7
-     * Creates a `.stack` property on `targetObject`, which when accessed returns
8
-     * a string representing the location in the code at which
9
-     * `Error.captureStackTrace()` was called.
10
-     *
11
-     * ```js
12
-     * const myObject = {};
13
-     * Error.captureStackTrace(myObject);
14
-     * myObject.stack;  // Similar to `new Error().stack`
15
-     * ```
16
-     *
17
-     * The first line of the trace will be prefixed with
18
-     * `${myObject.name}: ${myObject.message}`.
19
-     *
20
-     * The optional `constructorOpt` argument accepts a function. If given, all frames
21
-     * above `constructorOpt`, including `constructorOpt`, will be omitted from the
22
-     * generated stack trace.
23
-     *
24
-     * The `constructorOpt` argument is useful for hiding implementation
25
-     * details of error generation from the user. For instance:
26
-     *
27
-     * ```js
28
-     * function a() {
29
-     *   b();
30
-     * }
31
-     *
32
-     * function b() {
33
-     *   c();
34
-     * }
35
-     *
36
-     * function c() {
37
-     *   // Create an error without stack trace to avoid calculating the stack trace twice.
38
-     *   const { stackTraceLimit } = Error;
39
-     *   Error.stackTraceLimit = 0;
40
-     *   const error = new Error();
41
-     *   Error.stackTraceLimit = stackTraceLimit;
42
-     *
43
-     *   // Capture the stack trace above function b
44
-     *   Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
45
-     *   throw error;
46
-     * }
47
-     *
48
-     * a();
49
-     * ```
50
-     */
51
-    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
52
-    /**
53
-     * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
54
-     */
55
-    prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
56
-    /**
57
-     * The `Error.stackTraceLimit` property specifies the number of stack frames
58
-     * collected by a stack trace (whether generated by `new Error().stack` or
59
-     * `Error.captureStackTrace(obj)`).
60
-     *
61
-     * The default value is `10` but may be set to any valid JavaScript number. Changes
62
-     * will affect any stack trace captured _after_ the value has been changed.
63
-     *
64
-     * If set to a non-number value, or set to a negative number, stack traces will
65
-     * not capture any frames.
66
-     */
67
-    stackTraceLimit: number;
68
-}
69
-
70
-/**
71
- * Enable this API with the `--expose-gc` CLI flag.
72
- */
73
-declare var gc: NodeJS.GCFunction | undefined;
74
-
75
-declare namespace NodeJS {
76
-    interface CallSite {
77
-        getColumnNumber(): number | null;
78
-        getEnclosingColumnNumber(): number | null;
79
-        getEnclosingLineNumber(): number | null;
80
-        getEvalOrigin(): string | undefined;
81
-        getFileName(): string | null;
82
-        getFunction(): Function | undefined;
83
-        getFunctionName(): string | null;
84
-        getLineNumber(): number | null;
85
-        getMethodName(): string | null;
86
-        getPosition(): number;
87
-        getPromiseIndex(): number | null;
88
-        getScriptHash(): string;
89
-        getScriptNameOrSourceURL(): string | null;
90
-        getThis(): unknown;
91
-        getTypeName(): string | null;
92
-        isAsync(): boolean;
93
-        isConstructor(): boolean;
94
-        isEval(): boolean;
95
-        isNative(): boolean;
96
-        isPromiseAll(): boolean;
97
-        isToplevel(): boolean;
98
-    }
99
-
100
-    interface ErrnoException extends Error {
101
-        errno?: number | undefined;
102
-        code?: string | undefined;
103
-        path?: string | undefined;
104
-        syscall?: string | undefined;
105
-    }
106
-
107
-    interface RefCounted {
108
-        ref(): this;
109
-        unref(): this;
110
-    }
111
-
112
-    interface Dict<T> {
113
-        [key: string]: T | undefined;
114
-    }
115
-
116
-    interface ReadOnlyDict<T> {
117
-        readonly [key: string]: T | undefined;
118
-    }
119
-
120
-    type PartialOptions<T> = { [K in keyof T]?: T[K] | undefined };
121
-
122
-    interface GCFunction {
123
-        (minor?: boolean): void;
124
-        (options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
125
-        (options: NodeJS.GCOptions): void;
126
-    }
127
-
128
-    interface GCOptions {
129
-        execution?: "sync" | "async" | undefined;
130
-        flavor?: "regular" | "last-resort" | undefined;
131
-        type?: "major-snapshot" | "major" | "minor" | undefined;
132
-        filename?: string | undefined;
133
-    }
134
-
135
-    /** An iterable iterator returned by the Node.js API. */
136
-    interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
137
-        [Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
138
-    }
139
-
140
-    /** An async iterable iterator returned by the Node.js API. */
141
-    interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
142
-        [Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
143
-    }
144
-
145
-    /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */
146
-    type BufferSource = NonSharedArrayBufferView | ArrayBuffer;
147
-
148
-    /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */
149
-    type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike;
150
-}

+ 0 - 101
test/node_modules/@types/node/globals.typedarray.d.ts

@@ -1,101 +0,0 @@
1
-export {}; // Make this a module
2
-
3
-declare global {
4
-    namespace NodeJS {
5
-        type TypedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
6
-            | Uint8Array<TArrayBuffer>
7
-            | Uint8ClampedArray<TArrayBuffer>
8
-            | Uint16Array<TArrayBuffer>
9
-            | Uint32Array<TArrayBuffer>
10
-            | Int8Array<TArrayBuffer>
11
-            | Int16Array<TArrayBuffer>
12
-            | Int32Array<TArrayBuffer>
13
-            | BigUint64Array<TArrayBuffer>
14
-            | BigInt64Array<TArrayBuffer>
15
-            | Float16Array<TArrayBuffer>
16
-            | Float32Array<TArrayBuffer>
17
-            | Float64Array<TArrayBuffer>;
18
-        type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
19
-            | TypedArray<TArrayBuffer>
20
-            | DataView<TArrayBuffer>;
21
-
22
-        // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node
23
-        // while maintaining compatibility with TS <=5.6.
24
-        // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types.
25
-        /**
26
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
27
-         * TypeScript versions earlier than 5.7.
28
-         */
29
-        type NonSharedUint8Array = Uint8Array<ArrayBuffer>;
30
-        /**
31
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
32
-         * TypeScript versions earlier than 5.7.
33
-         */
34
-        type NonSharedUint8ClampedArray = Uint8ClampedArray<ArrayBuffer>;
35
-        /**
36
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
37
-         * TypeScript versions earlier than 5.7.
38
-         */
39
-        type NonSharedUint16Array = Uint16Array<ArrayBuffer>;
40
-        /**
41
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
42
-         * TypeScript versions earlier than 5.7.
43
-         */
44
-        type NonSharedUint32Array = Uint32Array<ArrayBuffer>;
45
-        /**
46
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
47
-         * TypeScript versions earlier than 5.7.
48
-         */
49
-        type NonSharedInt8Array = Int8Array<ArrayBuffer>;
50
-        /**
51
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
52
-         * TypeScript versions earlier than 5.7.
53
-         */
54
-        type NonSharedInt16Array = Int16Array<ArrayBuffer>;
55
-        /**
56
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
57
-         * TypeScript versions earlier than 5.7.
58
-         */
59
-        type NonSharedInt32Array = Int32Array<ArrayBuffer>;
60
-        /**
61
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
62
-         * TypeScript versions earlier than 5.7.
63
-         */
64
-        type NonSharedBigUint64Array = BigUint64Array<ArrayBuffer>;
65
-        /**
66
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
67
-         * TypeScript versions earlier than 5.7.
68
-         */
69
-        type NonSharedBigInt64Array = BigInt64Array<ArrayBuffer>;
70
-        /**
71
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
72
-         * TypeScript versions earlier than 5.7.
73
-         */
74
-        type NonSharedFloat16Array = Float16Array<ArrayBuffer>;
75
-        /**
76
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
77
-         * TypeScript versions earlier than 5.7.
78
-         */
79
-        type NonSharedFloat32Array = Float32Array<ArrayBuffer>;
80
-        /**
81
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
82
-         * TypeScript versions earlier than 5.7.
83
-         */
84
-        type NonSharedFloat64Array = Float64Array<ArrayBuffer>;
85
-        /**
86
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
87
-         * TypeScript versions earlier than 5.7.
88
-         */
89
-        type NonSharedDataView = DataView<ArrayBuffer>;
90
-        /**
91
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
92
-         * TypeScript versions earlier than 5.7.
93
-         */
94
-        type NonSharedTypedArray = TypedArray<ArrayBuffer>;
95
-        /**
96
-         * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
97
-         * TypeScript versions earlier than 5.7.
98
-         */
99
-        type NonSharedArrayBufferView = ArrayBufferView<ArrayBuffer>;
100
-    }
101
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 2147
test/node_modules/@types/node/http.d.ts


Разлика између датотеке није приказан због своје велике величине
+ 0 - 2488
test/node_modules/@types/node/http2.d.ts


+ 0 - 400
test/node_modules/@types/node/https.d.ts

@@ -1,400 +0,0 @@
1
-declare module "node:https" {
2
-    import * as http from "node:http";
3
-    import { Duplex } from "node:stream";
4
-    import * as tls from "node:tls";
5
-    import { URL } from "node:url";
6
-    interface ServerOptions<
7
-        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
8
-        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
9
-    > extends http.ServerOptions<Request, Response>, tls.TlsOptions {}
10
-    interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions {
11
-        checkServerIdentity?:
12
-            | ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined)
13
-            | undefined;
14
-        rejectUnauthorized?: boolean | undefined; // Defaults to true
15
-        servername?: string | undefined; // SNI TLS Extension
16
-    }
17
-    interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
18
-        maxCachedSessions?: number | undefined;
19
-    }
20
-    /**
21
-     * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
22
-     *
23
-     * Like `http.Agent`, the `createConnection(options[, callback])` method can be overridden
24
-     * to customize how TLS connections are established.
25
-     *
26
-     * > See `agent.createConnection()` for details on overriding this method,
27
-     * > including asynchronous socket creation with a callback.
28
-     * @since v0.4.5
29
-     */
30
-    class Agent extends http.Agent {
31
-        constructor(options?: AgentOptions);
32
-        options: AgentOptions;
33
-        createConnection(
34
-            options: RequestOptions,
35
-            callback?: (err: Error | null, stream: Duplex) => void,
36
-        ): Duplex | null | undefined;
37
-        getName(options?: RequestOptions): string;
38
-    }
39
-    interface ServerEventMap<
40
-        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
41
-        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
42
-    > extends http.ServerEventMap<Request, Response>, tls.ServerEventMap {}
43
-    /**
44
-     * See `http.Server` for more information.
45
-     * @since v0.3.4
46
-     */
47
-    class Server<
48
-        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
49
-        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
50
-    > extends tls.Server {
51
-        constructor(requestListener?: http.RequestListener<Request, Response>);
52
-        constructor(
53
-            options: ServerOptions<Request, Response>,
54
-            requestListener?: http.RequestListener<Request, Response>,
55
-        );
56
-        /**
57
-         * Closes all connections connected to this server.
58
-         * @since v18.2.0
59
-         */
60
-        closeAllConnections(): void;
61
-        /**
62
-         * Closes all connections connected to this server which are not sending a request or waiting for a response.
63
-         * @since v18.2.0
64
-         */
65
-        closeIdleConnections(): void;
66
-        // #region InternalEventEmitter
67
-        addListener<E extends keyof ServerEventMap>(
68
-            eventName: E,
69
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
70
-        ): this;
71
-        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
72
-        emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
73
-        emit(eventName: string | symbol, ...args: any[]): boolean;
74
-        listenerCount<E extends keyof ServerEventMap>(
75
-            eventName: E,
76
-            listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
77
-        ): number;
78
-        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
79
-        listeners<E extends keyof ServerEventMap>(
80
-            eventName: E,
81
-        ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
82
-        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
83
-        off<E extends keyof ServerEventMap>(
84
-            eventName: E,
85
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
86
-        ): this;
87
-        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
88
-        on<E extends keyof ServerEventMap>(
89
-            eventName: E,
90
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
91
-        ): this;
92
-        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
93
-        once<E extends keyof ServerEventMap>(
94
-            eventName: E,
95
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
96
-        ): this;
97
-        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
98
-        prependListener<E extends keyof ServerEventMap>(
99
-            eventName: E,
100
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
101
-        ): this;
102
-        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
103
-        prependOnceListener<E extends keyof ServerEventMap>(
104
-            eventName: E,
105
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
106
-        ): this;
107
-        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
108
-        rawListeners<E extends keyof ServerEventMap>(
109
-            eventName: E,
110
-        ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
111
-        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
112
-        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
113
-        removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
114
-        removeAllListeners(eventName?: string | symbol): this;
115
-        removeListener<E extends keyof ServerEventMap>(
116
-            eventName: E,
117
-            listener: (...args: ServerEventMap<Request, Response>[E]) => void,
118
-        ): this;
119
-        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
120
-        // #endregion
121
-    }
122
-    interface Server<
123
-        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
124
-        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
125
-    > extends http.Server<Request, Response> {}
126
-    /**
127
-     * ```js
128
-     * // curl -k https://localhost:8000/
129
-     * import https from 'node:https';
130
-     * import fs from 'node:fs';
131
-     *
132
-     * const options = {
133
-     *   key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
134
-     *   cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
135
-     * };
136
-     *
137
-     * https.createServer(options, (req, res) => {
138
-     *   res.writeHead(200);
139
-     *   res.end('hello world\n');
140
-     * }).listen(8000);
141
-     * ```
142
-     *
143
-     * Or
144
-     *
145
-     * ```js
146
-     * import https from 'node:https';
147
-     * import fs from 'node:fs';
148
-     *
149
-     * const options = {
150
-     *   pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
151
-     *   passphrase: 'sample',
152
-     * };
153
-     *
154
-     * https.createServer(options, (req, res) => {
155
-     *   res.writeHead(200);
156
-     *   res.end('hello world\n');
157
-     * }).listen(8000);
158
-     * ```
159
-     * @since v0.3.4
160
-     * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
161
-     * @param requestListener A listener to be added to the `'request'` event.
162
-     */
163
-    function createServer<
164
-        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
165
-        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
166
-    >(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
167
-    function createServer<
168
-        Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
169
-        Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
170
-    >(
171
-        options: ServerOptions<Request, Response>,
172
-        requestListener?: http.RequestListener<Request, Response>,
173
-    ): Server<Request, Response>;
174
-    /**
175
-     * Makes a request to a secure web server.
176
-     *
177
-     * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`,
178
-     * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`.
179
-     *
180
-     * `options` can be an object, a string, or a `URL` object. If `options` is a
181
-     * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
182
-     *
183
-     * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
184
-     * upload a file with a POST request, then write to the `ClientRequest` object.
185
-     *
186
-     * ```js
187
-     * import https from 'node:https';
188
-     *
189
-     * const options = {
190
-     *   hostname: 'encrypted.google.com',
191
-     *   port: 443,
192
-     *   path: '/',
193
-     *   method: 'GET',
194
-     * };
195
-     *
196
-     * const req = https.request(options, (res) => {
197
-     *   console.log('statusCode:', res.statusCode);
198
-     *   console.log('headers:', res.headers);
199
-     *
200
-     *   res.on('data', (d) => {
201
-     *     process.stdout.write(d);
202
-     *   });
203
-     * });
204
-     *
205
-     * req.on('error', (e) => {
206
-     *   console.error(e);
207
-     * });
208
-     * req.end();
209
-     * ```
210
-     *
211
-     * Example using options from `tls.connect()`:
212
-     *
213
-     * ```js
214
-     * const options = {
215
-     *   hostname: 'encrypted.google.com',
216
-     *   port: 443,
217
-     *   path: '/',
218
-     *   method: 'GET',
219
-     *   key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
220
-     *   cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
221
-     * };
222
-     * options.agent = new https.Agent(options);
223
-     *
224
-     * const req = https.request(options, (res) => {
225
-     *   // ...
226
-     * });
227
-     * ```
228
-     *
229
-     * Alternatively, opt out of connection pooling by not using an `Agent`.
230
-     *
231
-     * ```js
232
-     * const options = {
233
-     *   hostname: 'encrypted.google.com',
234
-     *   port: 443,
235
-     *   path: '/',
236
-     *   method: 'GET',
237
-     *   key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
238
-     *   cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
239
-     *   agent: false,
240
-     * };
241
-     *
242
-     * const req = https.request(options, (res) => {
243
-     *   // ...
244
-     * });
245
-     * ```
246
-     *
247
-     * Example using a `URL` as `options`:
248
-     *
249
-     * ```js
250
-     * const options = new URL('https://abc:xyz@example.com');
251
-     *
252
-     * const req = https.request(options, (res) => {
253
-     *   // ...
254
-     * });
255
-     * ```
256
-     *
257
-     * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
258
-     *
259
-     * ```js
260
-     * import tls from 'node:tls';
261
-     * import https from 'node:https';
262
-     * import crypto from 'node:crypto';
263
-     *
264
-     * function sha256(s) {
265
-     *   return crypto.createHash('sha256').update(s).digest('base64');
266
-     * }
267
-     * const options = {
268
-     *   hostname: 'github.com',
269
-     *   port: 443,
270
-     *   path: '/',
271
-     *   method: 'GET',
272
-     *   checkServerIdentity: function(host, cert) {
273
-     *     // Make sure the certificate is issued to the host we are connected to
274
-     *     const err = tls.checkServerIdentity(host, cert);
275
-     *     if (err) {
276
-     *       return err;
277
-     *     }
278
-     *
279
-     *     // Pin the public key, similar to HPKP pin-sha256 pinning
280
-     *     const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
281
-     *     if (sha256(cert.pubkey) !== pubkey256) {
282
-     *       const msg = 'Certificate verification error: ' +
283
-     *         `The public key of '${cert.subject.CN}' ` +
284
-     *         'does not match our pinned fingerprint';
285
-     *       return new Error(msg);
286
-     *     }
287
-     *
288
-     *     // Pin the exact certificate, rather than the pub key
289
-     *     const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
290
-     *       'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
291
-     *     if (cert.fingerprint256 !== cert256) {
292
-     *       const msg = 'Certificate verification error: ' +
293
-     *         `The certificate of '${cert.subject.CN}' ` +
294
-     *         'does not match our pinned fingerprint';
295
-     *       return new Error(msg);
296
-     *     }
297
-     *
298
-     *     // This loop is informational only.
299
-     *     // Print the certificate and public key fingerprints of all certs in the
300
-     *     // chain. Its common to pin the public key of the issuer on the public
301
-     *     // internet, while pinning the public key of the service in sensitive
302
-     *     // environments.
303
-     *     do {
304
-     *       console.log('Subject Common Name:', cert.subject.CN);
305
-     *       console.log('  Certificate SHA256 fingerprint:', cert.fingerprint256);
306
-     *
307
-     *       hash = crypto.createHash('sha256');
308
-     *       console.log('  Public key ping-sha256:', sha256(cert.pubkey));
309
-     *
310
-     *       lastprint256 = cert.fingerprint256;
311
-     *       cert = cert.issuerCertificate;
312
-     *     } while (cert.fingerprint256 !== lastprint256);
313
-     *
314
-     *   },
315
-     * };
316
-     *
317
-     * options.agent = new https.Agent(options);
318
-     * const req = https.request(options, (res) => {
319
-     *   console.log('All OK. Server matched our pinned cert or public key');
320
-     *   console.log('statusCode:', res.statusCode);
321
-     *   // Print the HPKP values
322
-     *   console.log('headers:', res.headers['public-key-pins']);
323
-     *
324
-     *   res.on('data', (d) => {});
325
-     * });
326
-     *
327
-     * req.on('error', (e) => {
328
-     *   console.error(e.message);
329
-     * });
330
-     * req.end();
331
-     * ```
332
-     *
333
-     * Outputs for example:
334
-     *
335
-     * ```text
336
-     * Subject Common Name: github.com
337
-     *   Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
338
-     *   Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
339
-     * Subject Common Name: DigiCert SHA2 Extended Validation Server CA
340
-     *   Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
341
-     *   Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
342
-     * Subject Common Name: DigiCert High Assurance EV Root CA
343
-     *   Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
344
-     *   Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
345
-     * All OK. Server matched our pinned cert or public key
346
-     * statusCode: 200
347
-     * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
348
-     * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
349
-     * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
350
-     * ```
351
-     * @since v0.3.6
352
-     * @param options Accepts all `options` from `request`, with some differences in default values:
353
-     */
354
-    function request(
355
-        options: RequestOptions | string | URL,
356
-        callback?: (res: http.IncomingMessage) => void,
357
-    ): http.ClientRequest;
358
-    function request(
359
-        url: string | URL,
360
-        options: RequestOptions,
361
-        callback?: (res: http.IncomingMessage) => void,
362
-    ): http.ClientRequest;
363
-    /**
364
-     * Like `http.get()` but for HTTPS.
365
-     *
366
-     * `options` can be an object, a string, or a `URL` object. If `options` is a
367
-     * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
368
-     *
369
-     * ```js
370
-     * import https from 'node:https';
371
-     *
372
-     * https.get('https://encrypted.google.com/', (res) => {
373
-     *   console.log('statusCode:', res.statusCode);
374
-     *   console.log('headers:', res.headers);
375
-     *
376
-     *   res.on('data', (d) => {
377
-     *     process.stdout.write(d);
378
-     *   });
379
-     *
380
-     * }).on('error', (e) => {
381
-     *   console.error(e);
382
-     * });
383
-     * ```
384
-     * @since v0.3.6
385
-     * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
386
-     */
387
-    function get(
388
-        options: RequestOptions | string | URL,
389
-        callback?: (res: http.IncomingMessage) => void,
390
-    ): http.ClientRequest;
391
-    function get(
392
-        url: string | URL,
393
-        options: RequestOptions,
394
-        callback?: (res: http.IncomingMessage) => void,
395
-    ): http.ClientRequest;
396
-    let globalAgent: Agent;
397
-}
398
-declare module "https" {
399
-    export * from "node:https";
400
-}

+ 0 - 117
test/node_modules/@types/node/index.d.ts

@@ -1,117 +0,0 @@
1
-/**
2
- * License for programmatically and manually incorporated
3
- * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
4
- *
5
- * Copyright Node.js contributors. All rights reserved.
6
- * Permission is hereby granted, free of charge, to any person obtaining a copy
7
- * of this software and associated documentation files (the "Software"), to
8
- * deal in the Software without restriction, including without limitation the
9
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
- * sell copies of the Software, and to permit persons to whom the Software is
11
- * furnished to do so, subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be included in
14
- * all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
- * IN THE SOFTWARE.
23
- */
24
-
25
-// NOTE: These definitions support Node.js and TypeScript 5.8+.
26
-
27
-// Reference required TypeScript libraries:
28
-/// <reference lib="es2020" />
29
-/// <reference lib="esnext.disposable" />
30
-/// <reference lib="esnext.float16" />
31
-
32
-// Iterator definitions required for compatibility with TypeScript <5.6:
33
-/// <reference path="compatibility/iterators.d.ts" />
34
-
35
-// Definitions for Node.js modules specific to TypeScript 5.7+:
36
-/// <reference path="globals.typedarray.d.ts" />
37
-/// <reference path="buffer.buffer.d.ts" />
38
-
39
-// Definitions for Node.js modules that are not specific to any version of TypeScript:
40
-/// <reference path="globals.d.ts" />
41
-/// <reference path="web-globals/abortcontroller.d.ts" />
42
-/// <reference path="web-globals/blob.d.ts" />
43
-/// <reference path="web-globals/console.d.ts" />
44
-/// <reference path="web-globals/crypto.d.ts" />
45
-/// <reference path="web-globals/domexception.d.ts" />
46
-/// <reference path="web-globals/encoding.d.ts" />
47
-/// <reference path="web-globals/events.d.ts" />
48
-/// <reference path="web-globals/fetch.d.ts" />
49
-/// <reference path="web-globals/importmeta.d.ts" />
50
-/// <reference path="web-globals/messaging.d.ts" />
51
-/// <reference path="web-globals/navigator.d.ts" />
52
-/// <reference path="web-globals/performance.d.ts" />
53
-/// <reference path="web-globals/storage.d.ts" />
54
-/// <reference path="web-globals/streams.d.ts" />
55
-/// <reference path="web-globals/timers.d.ts" />
56
-/// <reference path="web-globals/url.d.ts" />
57
-/// <reference path="assert.d.ts" />
58
-/// <reference path="assert/strict.d.ts" />
59
-/// <reference path="async_hooks.d.ts" />
60
-/// <reference path="buffer.d.ts" />
61
-/// <reference path="child_process.d.ts" />
62
-/// <reference path="cluster.d.ts" />
63
-/// <reference path="console.d.ts" />
64
-/// <reference path="constants.d.ts" />
65
-/// <reference path="crypto.d.ts" />
66
-/// <reference path="dgram.d.ts" />
67
-/// <reference path="diagnostics_channel.d.ts" />
68
-/// <reference path="dns.d.ts" />
69
-/// <reference path="dns/promises.d.ts" />
70
-/// <reference path="domain.d.ts" />
71
-/// <reference path="events.d.ts" />
72
-/// <reference path="fs.d.ts" />
73
-/// <reference path="fs/promises.d.ts" />
74
-/// <reference path="http.d.ts" />
75
-/// <reference path="http2.d.ts" />
76
-/// <reference path="https.d.ts" />
77
-/// <reference path="inspector.d.ts" />
78
-/// <reference path="inspector.generated.d.ts" />
79
-/// <reference path="inspector/promises.d.ts" />
80
-/// <reference path="module.d.ts" />
81
-/// <reference path="net.d.ts" />
82
-/// <reference path="os.d.ts" />
83
-/// <reference path="path.d.ts" />
84
-/// <reference path="path/posix.d.ts" />
85
-/// <reference path="path/win32.d.ts" />
86
-/// <reference path="perf_hooks.d.ts" />
87
-/// <reference path="process.d.ts" />
88
-/// <reference path="punycode.d.ts" />
89
-/// <reference path="querystring.d.ts" />
90
-/// <reference path="quic.d.ts" />
91
-/// <reference path="readline.d.ts" />
92
-/// <reference path="readline/promises.d.ts" />
93
-/// <reference path="repl.d.ts" />
94
-/// <reference path="sea.d.ts" />
95
-/// <reference path="sqlite.d.ts" />
96
-/// <reference path="stream.d.ts" />
97
-/// <reference path="stream/consumers.d.ts" />
98
-/// <reference path="stream/iter.d.ts" />
99
-/// <reference path="stream/promises.d.ts" />
100
-/// <reference path="stream/web.d.ts" />
101
-/// <reference path="string_decoder.d.ts" />
102
-/// <reference path="test.d.ts" />
103
-/// <reference path="test/reporters.d.ts" />
104
-/// <reference path="timers.d.ts" />
105
-/// <reference path="timers/promises.d.ts" />
106
-/// <reference path="tls.d.ts" />
107
-/// <reference path="trace_events.d.ts" />
108
-/// <reference path="tty.d.ts" />
109
-/// <reference path="url.d.ts" />
110
-/// <reference path="util.d.ts" />
111
-/// <reference path="util/types.d.ts" />
112
-/// <reference path="v8.d.ts" />
113
-/// <reference path="vm.d.ts" />
114
-/// <reference path="wasi.d.ts" />
115
-/// <reference path="worker_threads.d.ts" />
116
-/// <reference path="zlib.d.ts" />
117
-/// <reference path="zlib/iter.d.ts" />

+ 0 - 264
test/node_modules/@types/node/inspector.d.ts

@@ -1,264 +0,0 @@
1
-declare module "node:inspector" {
2
-    import { EventEmitter } from "node:events";
3
-    /**
4
-     * The `inspector.Session` is used for dispatching messages to the V8 inspector
5
-     * back-end and receiving message responses and notifications.
6
-     */
7
-    class Session extends EventEmitter {
8
-        /**
9
-         * Create a new instance of the inspector.Session class.
10
-         * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
11
-         */
12
-        constructor();
13
-        /**
14
-         * Connects a session to the inspector back-end.
15
-         */
16
-        connect(): void;
17
-        /**
18
-         * Connects a session to the inspector back-end.
19
-         * An exception will be thrown if this API was not called on a Worker thread.
20
-         * @since v12.11.0
21
-         */
22
-        connectToMainThread(): void;
23
-        /**
24
-         * Immediately close the session. All pending message callbacks will be called with an error.
25
-         * `session.connect()` will need to be called to be able to send messages again.
26
-         * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
27
-         */
28
-        disconnect(): void;
29
-    }
30
-    /**
31
-     * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has
32
-     * started.
33
-     *
34
-     * If wait is `true`, will block until a client has connected to the inspect port
35
-     * and flow control has been passed to the debugger client.
36
-     *
37
-     * See the [security warning](https://nodejs.org/docs/latest-v25.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
38
-     * regarding the `host` parameter usage.
39
-     * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
40
-     * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
41
-     * @param wait Block until a client has connected. Defaults to what was specified on the CLI.
42
-     * @returns Disposable that calls `inspector.close()`.
43
-     */
44
-    function open(port?: number, host?: string, wait?: boolean): Disposable;
45
-    /**
46
-     * Deactivate the inspector. Blocks until there are no active connections.
47
-     */
48
-    function close(): void;
49
-    /**
50
-     * Return the URL of the active inspector, or `undefined` if there is none.
51
-     *
52
-     * ```console
53
-     * $ node --inspect -p 'inspector.url()'
54
-     * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
55
-     * For help, see: https://nodejs.org/en/docs/inspector
56
-     * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
57
-     *
58
-     * $ node --inspect=localhost:3000 -p 'inspector.url()'
59
-     * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
60
-     * For help, see: https://nodejs.org/en/docs/inspector
61
-     * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
62
-     *
63
-     * $ node -p 'inspector.url()'
64
-     * undefined
65
-     * ```
66
-     */
67
-    function url(): string | undefined;
68
-    /**
69
-     * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command.
70
-     *
71
-     * An exception will be thrown if there is no active inspector.
72
-     * @since v12.7.0
73
-     */
74
-    function waitForDebugger(): void;
75
-    // These methods are exposed by the V8 inspector console API (inspector/v8-console.h).
76
-    // The method signatures differ from those of the Node.js console, and are deliberately
77
-    // typed permissively.
78
-    interface InspectorConsole {
79
-        debug(...data: any[]): void;
80
-        error(...data: any[]): void;
81
-        info(...data: any[]): void;
82
-        log(...data: any[]): void;
83
-        warn(...data: any[]): void;
84
-        dir(...data: any[]): void;
85
-        dirxml(...data: any[]): void;
86
-        table(...data: any[]): void;
87
-        trace(...data: any[]): void;
88
-        group(...data: any[]): void;
89
-        groupCollapsed(...data: any[]): void;
90
-        groupEnd(...data: any[]): void;
91
-        clear(...data: any[]): void;
92
-        count(label?: any): void;
93
-        countReset(label?: any): void;
94
-        assert(value?: any, ...data: any[]): void;
95
-        profile(label?: any): void;
96
-        profileEnd(label?: any): void;
97
-        time(label?: any): void;
98
-        timeLog(label?: any): void;
99
-        timeStamp(label?: any): void;
100
-    }
101
-    /**
102
-     * An object to send messages to the remote inspector console.
103
-     * @since v11.0.0
104
-     */
105
-    const console: InspectorConsole;
106
-    // DevTools protocol event broadcast methods
107
-    namespace Network {
108
-        /**
109
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
110
-         *
111
-         * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that
112
-         * the application is about to send an HTTP request.
113
-         * @since v22.6.0
114
-         */
115
-        function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
116
-        /**
117
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
118
-         *
119
-         * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if
120
-         * `Network.streamResourceContent` command was not invoked for the given request yet.
121
-         *
122
-         * Also enables `Network.getResponseBody` command to retrieve the response data.
123
-         * @since v24.2.0
124
-         */
125
-        function dataReceived(params: DataReceivedEventDataType): void;
126
-        /**
127
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
128
-         *
129
-         * Enables `Network.getRequestPostData` command to retrieve the request data.
130
-         * @since v24.3.0
131
-         */
132
-        function dataSent(params: unknown): void;
133
-        /**
134
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
135
-         *
136
-         * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that
137
-         * HTTP response is available.
138
-         * @since v22.6.0
139
-         */
140
-        function responseReceived(params: ResponseReceivedEventDataType): void;
141
-        /**
142
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
143
-         *
144
-         * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that
145
-         * HTTP request has finished loading.
146
-         * @since v22.6.0
147
-         */
148
-        function loadingFinished(params: LoadingFinishedEventDataType): void;
149
-        /**
150
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
151
-         *
152
-         * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
153
-         * HTTP request has failed to load.
154
-         * @since v22.7.0
155
-         */
156
-        function loadingFailed(params: LoadingFailedEventDataType): void;
157
-        /**
158
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
159
-         *
160
-         * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that
161
-         * a WebSocket connection has been initiated.
162
-         * @since v24.7.0
163
-         */
164
-        function webSocketCreated(params: WebSocketCreatedEventDataType): void;
165
-        /**
166
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
167
-         *
168
-         * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends.
169
-         * This event indicates that the WebSocket handshake response has been received.
170
-         * @since v24.7.0
171
-         */
172
-        function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void;
173
-        /**
174
-         * This feature is only available with the `--experimental-network-inspection` flag enabled.
175
-         *
176
-         * Broadcasts the `Network.webSocketClosed` event to connected frontends.
177
-         * This event indicates that a WebSocket connection has been closed.
178
-         * @since v24.7.0
179
-         */
180
-        function webSocketClosed(params: WebSocketClosedEventDataType): void;
181
-    }
182
-    namespace NetworkResources {
183
-        /**
184
-         * This feature is only available with the `--experimental-inspector-network-resource` flag enabled.
185
-         *
186
-         * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource
187
-         * request issued via the Chrome DevTools Protocol (CDP).
188
-         * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as
189
-         * Chrome—requests the resource to retrieve the source map.
190
-         *
191
-         * This method allows developers to predefine the resource content to be served in response to such CDP requests.
192
-         *
193
-         * ```js
194
-         * const inspector = require('node:inspector');
195
-         * // By preemptively calling put to register the resource, a source map can be resolved when
196
-         * // a loadNetworkResource request is made from the frontend.
197
-         * async function setNetworkResources() {
198
-         *   const mapUrl = 'http://localhost:3000/dist/app.js.map';
199
-         *   const tsUrl = 'http://localhost:3000/src/app.ts';
200
-         *   const distAppJsMap = await fetch(mapUrl).then((res) => res.text());
201
-         *   const srcAppTs = await fetch(tsUrl).then((res) => res.text());
202
-         *   inspector.NetworkResources.put(mapUrl, distAppJsMap);
203
-         *   inspector.NetworkResources.put(tsUrl, srcAppTs);
204
-         * };
205
-         * setNetworkResources().then(() => {
206
-         *   require('./dist/app');
207
-         * });
208
-         * ```
209
-         *
210
-         * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource)
211
-         * @since v24.5.0
212
-         * @experimental
213
-         */
214
-        function put(url: string, data: string): void;
215
-    }
216
-    namespace DOMStorage {
217
-        /**
218
-         * This feature is only available with the
219
-         * `--experimental-storage-inspection` flag enabled.
220
-         *
221
-         * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
222
-         * This event indicates that a new item has been added to the storage.
223
-         * @since v25.5.0
224
-         */
225
-        function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void;
226
-        /**
227
-         * This feature is only available with the
228
-         * `--experimental-storage-inspection` flag enabled.
229
-         *
230
-         * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
231
-         * This event indicates that an item has been removed from the storage.
232
-         * @since v25.5.0
233
-         */
234
-        function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void;
235
-        /**
236
-         * This feature is only available with the
237
-         * `--experimental-storage-inspection` flag enabled.
238
-
239
-         * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
240
-         * This event indicates that a storage item has been updated.
241
-         * @since v25.5.0
242
-         */
243
-        function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void;
244
-        /**
245
-         * This feature is only available with the
246
-         * `--experimental-storage-inspection` flag enabled.
247
-         *
248
-         * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
249
-         * frontends. This event indicates that all items have been cleared from the
250
-         * storage.
251
-         * @since v25.5.0
252
-         */
253
-        function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void;
254
-        /**
255
-         * This feature is only available with the
256
-         * `--experimental-storage-inspection` flag enabled.
257
-         * @since v25.5.0
258
-         */
259
-        function registerStorage(params: unknown): void;
260
-    }
261
-}
262
-declare module "inspector" {
263
-    export * from "node:inspector";
264
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 4406
test/node_modules/@types/node/inspector.generated.d.ts


+ 0 - 35
test/node_modules/@types/node/inspector/promises.d.ts

@@ -1,35 +0,0 @@
1
-declare module "node:inspector/promises" {
2
-    import { EventEmitter } from "node:events";
3
-    export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
4
-    /**
5
-     * The `inspector.Session` is used for dispatching messages to the V8 inspector
6
-     * back-end and receiving message responses and notifications.
7
-     * @since v19.0.0
8
-     */
9
-    export class Session extends EventEmitter {
10
-        /**
11
-         * Create a new instance of the inspector.Session class.
12
-         * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
13
-         */
14
-        constructor();
15
-        /**
16
-         * Connects a session to the inspector back-end.
17
-         */
18
-        connect(): void;
19
-        /**
20
-         * Connects a session to the inspector back-end.
21
-         * An exception will be thrown if this API was not called on a Worker thread.
22
-         * @since v12.11.0
23
-         */
24
-        connectToMainThread(): void;
25
-        /**
26
-         * Immediately close the session. All pending message callbacks will be called with an error.
27
-         * `session.connect()` will need to be called to be able to send messages again.
28
-         * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
29
-         */
30
-        disconnect(): void;
31
-    }
32
-}
33
-declare module "inspector/promises" {
34
-    export * from "node:inspector/promises";
35
-}

+ 0 - 755
test/node_modules/@types/node/module.d.ts

@@ -1,755 +0,0 @@
1
-declare module "node:module" {
2
-    import { URL } from "node:url";
3
-    class Module {
4
-        constructor(id: string, parent?: Module);
5
-    }
6
-    interface Module extends NodeJS.Module {}
7
-    namespace Module {
8
-        export { Module };
9
-    }
10
-    namespace Module {
11
-        /**
12
-         * A list of the names of all modules provided by Node.js. Can be used to verify
13
-         * if a module is maintained by a third party or not.
14
-         *
15
-         * Note: the list doesn't contain prefix-only modules like `node:test`.
16
-         * @since v9.3.0, v8.10.0, v6.13.0
17
-         */
18
-        const builtinModules: readonly string[];
19
-        /**
20
-         * @since v12.2.0
21
-         * @param path Filename to be used to construct the require
22
-         * function. Must be a file URL object, file URL string, or absolute path
23
-         * string.
24
-         */
25
-        function createRequire(path: string | URL): NodeJS.Require;
26
-        namespace constants {
27
-            /**
28
-             * The following constants are returned as the `status` field in the object returned by
29
-             * {@link enableCompileCache} to indicate the result of the attempt to enable the
30
-             * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
31
-             * @since v22.8.0
32
-             */
33
-            namespace compileCacheStatus {
34
-                /**
35
-                 * Node.js has enabled the compile cache successfully. The directory used to store the
36
-                 * compile cache will be returned in the `directory` field in the
37
-                 * returned object.
38
-                 */
39
-                const ENABLED: number;
40
-                /**
41
-                 * The compile cache has already been enabled before, either by a previous call to
42
-                 * {@link enableCompileCache}, or by the `NODE_COMPILE_CACHE=dir`
43
-                 * environment variable. The directory used to store the
44
-                 * compile cache will be returned in the `directory` field in the
45
-                 * returned object.
46
-                 */
47
-                const ALREADY_ENABLED: number;
48
-                /**
49
-                 * Node.js fails to enable the compile cache. This can be caused by the lack of
50
-                 * permission to use the specified directory, or various kinds of file system errors.
51
-                 * The detail of the failure will be returned in the `message` field in the
52
-                 * returned object.
53
-                 */
54
-                const FAILED: number;
55
-                /**
56
-                 * Node.js cannot enable the compile cache because the environment variable
57
-                 * `NODE_DISABLE_COMPILE_CACHE=1` has been set.
58
-                 */
59
-                const DISABLED: number;
60
-            }
61
-        }
62
-        interface EnableCompileCacheOptions {
63
-            /**
64
-             * Optional. Directory to store the compile cache. If not specified,
65
-             * the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable
66
-             * will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')`
67
-             * otherwise.
68
-             * @since v25.0.0
69
-             */
70
-            directory?: string | undefined;
71
-            /**
72
-             * Optional. If `true`, enables portable compile cache so that
73
-             * the cache can be reused even if the project directory is moved. This is a best-effort
74
-             * feature. If not specified, it will depend on whether the environment variable
75
-             * `NODE_COMPILE_CACHE_PORTABLE=1` is set.
76
-             * @since v25.0.0
77
-             */
78
-            portable?: boolean | undefined;
79
-        }
80
-        interface EnableCompileCacheResult {
81
-            /**
82
-             * One of the {@link constants.compileCacheStatus}
83
-             */
84
-            status: number;
85
-            /**
86
-             * If Node.js cannot enable the compile cache, this contains
87
-             * the error message. Only set if `status` is `module.constants.compileCacheStatus.FAILED`.
88
-             */
89
-            message?: string;
90
-            /**
91
-             * If the compile cache is enabled, this contains the directory
92
-             * where the compile cache is stored. Only set if  `status` is
93
-             * `module.constants.compileCacheStatus.ENABLED` or
94
-             * `module.constants.compileCacheStatus.ALREADY_ENABLED`.
95
-             */
96
-            directory?: string;
97
-        }
98
-        /**
99
-         * Enable [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
100
-         * in the current Node.js instance.
101
-         *
102
-         * For general use cases, it's recommended to call `module.enableCompileCache()` without
103
-         * specifying the `options.directory`, so that the directory can be overridden by the
104
-         * `NODE_COMPILE_CACHE` environment variable when necessary.
105
-         *
106
-         * Since compile cache is supposed to be a optimization that is not mission critical, this
107
-         * method is designed to not throw any exception when the compile cache cannot be enabled.
108
-         * Instead, it will return an object containing an error message in the `message` field to
109
-         * aid debugging. If compile cache is enabled successfully, the `directory` field in the
110
-         * returned object contains the path to the directory where the compile cache is stored. The
111
-         * `status` field in the returned object would be one of the `module.constants.compileCacheStatus`
112
-         * values to indicate the result of the attempt to enable the
113
-         * [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
114
-         *
115
-         * This method only affects the current Node.js instance. To enable it in child worker threads,
116
-         * either call this method in child worker threads too, or set the
117
-         * `process.env.NODE_COMPILE_CACHE` value to compile cache directory so the behavior can
118
-         * be inherited into the child workers. The directory can be obtained either from the
119
-         * `directory` field returned by this method, or with {@link getCompileCacheDir}.
120
-         * @since v22.8.0
121
-         * @param options Optional. If a string is passed, it is considered to be `options.directory`.
122
-         */
123
-        function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult;
124
-        /**
125
-         * Flush the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
126
-         * accumulated from modules already loaded
127
-         * in the current Node.js instance to disk. This returns after all the flushing
128
-         * file system operations come to an end, no matter they succeed or not. If there
129
-         * are any errors, this will fail silently, since compile cache misses should not
130
-         * interfere with the actual operation of the application.
131
-         * @since v22.10.0
132
-         */
133
-        function flushCompileCache(): void;
134
-        /**
135
-         * @since v22.8.0
136
-         * @return Path to the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
137
-         * directory if it is enabled, or `undefined` otherwise.
138
-         */
139
-        function getCompileCacheDir(): string | undefined;
140
-        /**
141
-         * ```text
142
-         * /path/to/project
143
-         *   ├ packages/
144
-         *     ├ bar/
145
-         *       ├ bar.js
146
-         *       └ package.json // name = '@foo/bar'
147
-         *     └ qux/
148
-         *       ├ node_modules/
149
-         *         └ some-package/
150
-         *           └ package.json // name = 'some-package'
151
-         *       ├ qux.js
152
-         *       └ package.json // name = '@foo/qux'
153
-         *   ├ main.js
154
-         *   └ package.json // name = '@foo'
155
-         * ```
156
-         * ```js
157
-         * // /path/to/project/packages/bar/bar.js
158
-         * import { findPackageJSON } from 'node:module';
159
-         *
160
-         * findPackageJSON('..', import.meta.url);
161
-         * // '/path/to/project/package.json'
162
-         * // Same result when passing an absolute specifier instead:
163
-         * findPackageJSON(new URL('../', import.meta.url));
164
-         * findPackageJSON(import.meta.resolve('../'));
165
-         *
166
-         * findPackageJSON('some-package', import.meta.url);
167
-         * // '/path/to/project/packages/bar/node_modules/some-package/package.json'
168
-         * // When passing an absolute specifier, you might get a different result if the
169
-         * // resolved module is inside a subfolder that has nested `package.json`.
170
-         * findPackageJSON(import.meta.resolve('some-package'));
171
-         * // '/path/to/project/packages/bar/node_modules/some-package/some-subfolder/package.json'
172
-         *
173
-         * findPackageJSON('@foo/qux', import.meta.url);
174
-         * // '/path/to/project/packages/qux/package.json'
175
-         * ```
176
-         * @since v22.14.0
177
-         * @param specifier The specifier for the module whose `package.json` to
178
-         * retrieve. When passing a _bare specifier_, the `package.json` at the root of
179
-         * the package is returned. When passing a _relative specifier_ or an _absolute specifier_,
180
-         * the closest parent `package.json` is returned.
181
-         * @param base The absolute location (`file:` URL string or FS path) of the
182
-         * containing  module. For CJS, use `__filename` (not `__dirname`!); for ESM, use
183
-         * `import.meta.url`. You do not need to pass it if `specifier` is an _absolute specifier_.
184
-         * @returns A path if the `package.json` is found. When `startLocation`
185
-         * is a package, the package's root `package.json`; when a relative or unresolved, the closest
186
-         * `package.json` to the `startLocation`.
187
-         */
188
-        function findPackageJSON(specifier: string | URL, base?: string | URL): string | undefined;
189
-        /**
190
-         * @since v18.6.0, v16.17.0
191
-         */
192
-        function isBuiltin(moduleName: string): boolean;
193
-        interface RegisterOptions<Data> {
194
-            /**
195
-             * If you want to resolve `specifier` relative to a
196
-             * base URL, such as `import.meta.url`, you can pass that URL here. This
197
-             * property is ignored if the `parentURL` is supplied as the second argument.
198
-             * @default 'data:'
199
-             */
200
-            parentURL?: string | URL | undefined;
201
-            /**
202
-             * Any arbitrary, cloneable JavaScript value to pass into the
203
-             * {@link initialize} hook.
204
-             */
205
-            data?: Data | undefined;
206
-            /**
207
-             * [Transferable objects](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist)
208
-             * to be passed into the `initialize` hook.
209
-             */
210
-            transferList?: any[] | undefined;
211
-        }
212
-        /* eslint-disable @definitelytyped/no-unnecessary-generics */
213
-        /**
214
-         * Register a module that exports hooks that customize Node.js module
215
-         * resolution and loading behavior. See
216
-         * [Customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks).
217
-         *
218
-         * This feature requires `--allow-worker` if used with the
219
-         * [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model).
220
-         * @since v20.6.0, v18.19.0
221
-         * @deprecated Use `module.registerHooks()` instead.
222
-         * @param specifier Customization hooks to be registered; this should be
223
-         * the same string that would be passed to `import()`, except that if it is
224
-         * relative, it is resolved relative to `parentURL`.
225
-         * @param parentURL f you want to resolve `specifier` relative to a base
226
-         * URL, such as `import.meta.url`, you can pass that URL here.
227
-         */
228
-        function register<Data = any>(
229
-            specifier: string | URL,
230
-            parentURL?: string | URL,
231
-            options?: RegisterOptions<Data>,
232
-        ): void;
233
-        function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
234
-        interface RegisterHooksOptions {
235
-            /**
236
-             * See [load hook](https://nodejs.org/docs/latest-v25.x/api/module.html#loadurl-context-nextload).
237
-             * @default undefined
238
-             */
239
-            load?: LoadHookSync | undefined;
240
-            /**
241
-             * See [resolve hook](https://nodejs.org/docs/latest-v25.x/api/module.html#resolvespecifier-context-nextresolve).
242
-             * @default undefined
243
-             */
244
-            resolve?: ResolveHookSync | undefined;
245
-        }
246
-        interface ModuleHooks {
247
-            /**
248
-             * Deregister the hook instance.
249
-             */
250
-            deregister(): void;
251
-        }
252
-        /**
253
-         * Register [hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks)
254
-         * that customize Node.js module resolution and loading behavior.
255
-         * @since v22.15.0
256
-         * @experimental
257
-         */
258
-        function registerHooks(options: RegisterHooksOptions): ModuleHooks;
259
-        interface StripTypeScriptTypesOptions {
260
-            /**
261
-             * Possible values are:
262
-             * * `'strip'` Only strip type annotations without performing the transformation of TypeScript features.
263
-             * * `'transform'` Strip type annotations and transform TypeScript features to JavaScript.
264
-             * @default 'strip'
265
-             */
266
-            mode?: "strip" | "transform" | undefined;
267
-            /**
268
-             * Only when `mode` is `'transform'`, if `true`, a source map
269
-             * will be generated for the transformed code.
270
-             * @default false
271
-             */
272
-            sourceMap?: boolean | undefined;
273
-            /**
274
-             * Specifies the source url used in the source map.
275
-             */
276
-            sourceUrl?: string | undefined;
277
-        }
278
-        /**
279
-         * `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It
280
-         * can be used to strip type annotations from TypeScript code before running it
281
-         * with `vm.runInContext()` or `vm.compileFunction()`.
282
-         * By default, it will throw an error if the code contains TypeScript features
283
-         * that require transformation such as `Enums`,
284
-         * see [type-stripping](https://nodejs.org/docs/latest-v25.x/api/typescript.md#type-stripping) for more information.
285
-         * When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
286
-         * see [transform TypeScript features](https://nodejs.org/docs/latest-v25.x/api/typescript.md#typescript-features) for more information.
287
-         * When mode is `'strip'`, source maps are not generated, because locations are preserved.
288
-         * If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
289
-         *
290
-         * _WARNING_: The output of this function should not be considered stable across Node.js versions,
291
-         * due to changes in the TypeScript parser.
292
-         *
293
-         * ```js
294
-         * import { stripTypeScriptTypes } from 'node:module';
295
-         * const code = 'const a: number = 1;';
296
-         * const strippedCode = stripTypeScriptTypes(code);
297
-         * console.log(strippedCode);
298
-         * // Prints: const a         = 1;
299
-         * ```
300
-         *
301
-         * If `sourceUrl` is provided, it will be used appended as a comment at the end of the output:
302
-         *
303
-         * ```js
304
-         * import { stripTypeScriptTypes } from 'node:module';
305
-         * const code = 'const a: number = 1;';
306
-         * const strippedCode = stripTypeScriptTypes(code, { mode: 'strip', sourceUrl: 'source.ts' });
307
-         * console.log(strippedCode);
308
-         * // Prints: const a         = 1\n\n//# sourceURL=source.ts;
309
-         * ```
310
-         *
311
-         * When `mode` is `'transform'`, the code is transformed to JavaScript:
312
-         *
313
-         * ```js
314
-         * import { stripTypeScriptTypes } from 'node:module';
315
-         * const code = `
316
-         *   namespace MathUtil {
317
-         *     export const add = (a: number, b: number) => a + b;
318
-         *   }`;
319
-         * const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true });
320
-         * console.log(strippedCode);
321
-         * // Prints:
322
-         * // var MathUtil;
323
-         * // (function(MathUtil) {
324
-         * //     MathUtil.add = (a, b)=>a + b;
325
-         * // })(MathUtil || (MathUtil = {}));
326
-         * // # sourceMappingURL=data:application/json;base64, ...
327
-         * ```
328
-         * @since v22.13.0
329
-         * @param code The code to strip type annotations from.
330
-         * @returns The code with type annotations stripped.
331
-         */
332
-        function stripTypeScriptTypes(code: string, options?: StripTypeScriptTypesOptions): string;
333
-        /* eslint-enable @definitelytyped/no-unnecessary-generics */
334
-        /**
335
-         * The `module.syncBuiltinESMExports()` method updates all the live bindings for
336
-         * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
337
-         * does not add or remove exported names from the `ES Modules`.
338
-         *
339
-         * ```js
340
-         * import fs from 'node:fs';
341
-         * import assert from 'node:assert';
342
-         * import { syncBuiltinESMExports } from 'node:module';
343
-         *
344
-         * fs.readFile = newAPI;
345
-         *
346
-         * delete fs.readFileSync;
347
-         *
348
-         * function newAPI() {
349
-         *   // ...
350
-         * }
351
-         *
352
-         * fs.newAPI = newAPI;
353
-         *
354
-         * syncBuiltinESMExports();
355
-         *
356
-         * import('node:fs').then((esmFS) => {
357
-         *   // It syncs the existing readFile property with the new value
358
-         *   assert.strictEqual(esmFS.readFile, newAPI);
359
-         *   // readFileSync has been deleted from the required fs
360
-         *   assert.strictEqual('readFileSync' in fs, false);
361
-         *   // syncBuiltinESMExports() does not remove readFileSync from esmFS
362
-         *   assert.strictEqual('readFileSync' in esmFS, true);
363
-         *   // syncBuiltinESMExports() does not add names
364
-         *   assert.strictEqual(esmFS.newAPI, undefined);
365
-         * });
366
-         * ```
367
-         * @since v12.12.0
368
-         */
369
-        function syncBuiltinESMExports(): void;
370
-        interface ImportAttributes extends NodeJS.Dict<string> {
371
-            type?: string | undefined;
372
-        }
373
-        type ImportPhase = "source" | "evaluation";
374
-        type ModuleFormat =
375
-            | "addon"
376
-            | "builtin"
377
-            | "commonjs"
378
-            | "commonjs-typescript"
379
-            | "json"
380
-            | "module"
381
-            | "module-typescript"
382
-            | "wasm";
383
-        type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
384
-        type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
385
-        interface ResolveHookContext {
386
-            conditions: string[];
387
-            importAttributes: ImportAttributes;
388
-            parentURL: string | undefined;
389
-        }
390
-        interface ResolveFnOutput {
391
-            format?: string | null | undefined;
392
-            importAttributes?: ImportAttributes | undefined;
393
-            shortCircuit?: boolean | undefined;
394
-            url: string;
395
-        }
396
-        type ResolveHook = (
397
-            specifier: string,
398
-            context: ResolveHookContext,
399
-            nextResolve: (
400
-                specifier: string,
401
-                context?: Partial<ResolveHookContext>,
402
-            ) => ResolveFnOutput | Promise<ResolveFnOutput>,
403
-        ) => ResolveFnOutput | Promise<ResolveFnOutput>;
404
-        type ResolveHookSync = (
405
-            specifier: string,
406
-            context: ResolveHookContext,
407
-            nextResolve: (
408
-                specifier: string,
409
-                context?: Partial<ResolveHookContext>,
410
-            ) => ResolveFnOutput,
411
-        ) => ResolveFnOutput;
412
-        interface LoadHookContext {
413
-            conditions: string[];
414
-            format: string | null | undefined;
415
-            importAttributes: ImportAttributes;
416
-        }
417
-        interface LoadFnOutput {
418
-            format: string | null | undefined;
419
-            shortCircuit?: boolean | undefined;
420
-            source?: ModuleSource | undefined;
421
-        }
422
-        type LoadHook = (
423
-            url: string,
424
-            context: LoadHookContext,
425
-            nextLoad: (
426
-                url: string,
427
-                context?: Partial<LoadHookContext>,
428
-            ) => LoadFnOutput | Promise<LoadFnOutput>,
429
-        ) => LoadFnOutput | Promise<LoadFnOutput>;
430
-        type LoadHookSync = (
431
-            url: string,
432
-            context: LoadHookContext,
433
-            nextLoad: (
434
-                url: string,
435
-                context?: Partial<LoadHookContext>,
436
-            ) => LoadFnOutput,
437
-        ) => LoadFnOutput;
438
-        interface SourceMapsSupport {
439
-            /**
440
-             * If the source maps support is enabled
441
-             */
442
-            enabled: boolean;
443
-            /**
444
-             * If the support is enabled for files in `node_modules`.
445
-             */
446
-            nodeModules: boolean;
447
-            /**
448
-             * If the support is enabled for generated code from `eval` or `new Function`.
449
-             */
450
-            generatedCode: boolean;
451
-        }
452
-        /**
453
-         * This method returns whether the [Source Map v3](https://tc39.es/ecma426/) support for stack
454
-         * traces is enabled.
455
-         * @since v23.7.0, v22.14.0
456
-         */
457
-        function getSourceMapsSupport(): SourceMapsSupport;
458
-        /**
459
-         * `path` is the resolved path for the file for which a corresponding source map
460
-         * should be fetched.
461
-         * @since v13.7.0, v12.17.0
462
-         * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
463
-         */
464
-        function findSourceMap(path: string): SourceMap | undefined;
465
-        interface SetSourceMapsSupportOptions {
466
-            /**
467
-             * If enabling the support for files in `node_modules`.
468
-             * @default false
469
-             */
470
-            nodeModules?: boolean | undefined;
471
-            /**
472
-             * If enabling the support for generated code from `eval` or `new Function`.
473
-             * @default false
474
-             */
475
-            generatedCode?: boolean | undefined;
476
-        }
477
-        /**
478
-         * This function enables or disables the [Source Map v3](https://tc39.es/ecma426/) support for
479
-         * stack traces.
480
-         *
481
-         * It provides same features as launching Node.js process with commandline options
482
-         * `--enable-source-maps`, with additional options to alter the support for files
483
-         * in `node_modules` or generated codes.
484
-         *
485
-         * Only source maps in JavaScript files that are loaded after source maps has been
486
-         * enabled will be parsed and loaded. Preferably, use the commandline options
487
-         * `--enable-source-maps` to avoid losing track of source maps of modules loaded
488
-         * before this API call.
489
-         * @since v23.7.0, v22.14.0
490
-         */
491
-        function setSourceMapsSupport(enabled: boolean, options?: SetSourceMapsSupportOptions): void;
492
-        interface SourceMapConstructorOptions {
493
-            /**
494
-             * @since v21.0.0, v20.5.0
495
-             */
496
-            lineLengths?: readonly number[] | undefined;
497
-        }
498
-        interface SourceMapPayload {
499
-            file: string;
500
-            version: number;
501
-            sources: string[];
502
-            sourcesContent: string[];
503
-            names: string[];
504
-            mappings: string;
505
-            sourceRoot: string;
506
-        }
507
-        interface SourceMapping {
508
-            generatedLine: number;
509
-            generatedColumn: number;
510
-            originalSource: string;
511
-            originalLine: number;
512
-            originalColumn: number;
513
-        }
514
-        interface SourceOrigin {
515
-            /**
516
-             * The name of the range in the source map, if one was provided
517
-             */
518
-            name: string | undefined;
519
-            /**
520
-             * The file name of the original source, as reported in the SourceMap
521
-             */
522
-            fileName: string;
523
-            /**
524
-             * The 1-indexed lineNumber of the corresponding call site in the original source
525
-             */
526
-            lineNumber: number;
527
-            /**
528
-             * The 1-indexed columnNumber of the corresponding call site in the original source
529
-             */
530
-            columnNumber: number;
531
-        }
532
-        /**
533
-         * @since v13.7.0, v12.17.0
534
-         */
535
-        class SourceMap {
536
-            constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions);
537
-            /**
538
-             * Getter for the payload used to construct the `SourceMap` instance.
539
-             */
540
-            readonly payload: SourceMapPayload;
541
-            /**
542
-             * Given a line offset and column offset in the generated source
543
-             * file, returns an object representing the SourceMap range in the
544
-             * original file if found, or an empty object if not.
545
-             *
546
-             * The object returned contains the following keys:
547
-             *
548
-             * The returned value represents the raw range as it appears in the
549
-             * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
550
-             * column numbers as they appear in Error messages and CallSite
551
-             * objects.
552
-             *
553
-             * To get the corresponding 1-indexed line and column numbers from a
554
-             * lineNumber and columnNumber as they are reported by Error stacks
555
-             * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
556
-             * @param lineOffset The zero-indexed line number offset in the generated source
557
-             * @param columnOffset The zero-indexed column number offset in the generated source
558
-             */
559
-            findEntry(lineOffset: number, columnOffset: number): SourceMapping | {};
560
-            /**
561
-             * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source,
562
-             * find the corresponding call site location in the original source.
563
-             *
564
-             * If the `lineNumber` and `columnNumber` provided are not found in any source map,
565
-             * then an empty object is returned.
566
-             * @param lineNumber The 1-indexed line number of the call site in the generated source
567
-             * @param columnNumber The 1-indexed column number of the call site in the generated source
568
-             */
569
-            findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {};
570
-        }
571
-        function runMain(main?: string): void;
572
-        function wrap(script: string): string;
573
-    }
574
-    global {
575
-        namespace NodeJS {
576
-            interface Module {
577
-                /**
578
-                 * The module objects required for the first time by this one.
579
-                 * @since v0.1.16
580
-                 */
581
-                children: Module[];
582
-                /**
583
-                 * The `module.exports` object is created by the `Module` system. Sometimes this is
584
-                 * not acceptable; many want their module to be an instance of some class. To do
585
-                 * this, assign the desired export object to `module.exports`.
586
-                 * @since v0.1.16
587
-                 */
588
-                exports: any;
589
-                /**
590
-                 * The fully resolved filename of the module.
591
-                 * @since v0.1.16
592
-                 */
593
-                filename: string;
594
-                /**
595
-                 * The identifier for the module. Typically this is the fully resolved
596
-                 * filename.
597
-                 * @since v0.1.16
598
-                 */
599
-                id: string;
600
-                /**
601
-                 * `true` if the module is running during the Node.js preload
602
-                 * phase.
603
-                 * @since v15.4.0, v14.17.0
604
-                 */
605
-                isPreloading: boolean;
606
-                /**
607
-                 * Whether or not the module is done loading, or is in the process of
608
-                 * loading.
609
-                 * @since v0.1.16
610
-                 */
611
-                loaded: boolean;
612
-                /**
613
-                 * The module that first required this one, or `null` if the current module is the
614
-                 * entry point of the current process, or `undefined` if the module was loaded by
615
-                 * something that is not a CommonJS module (e.g. REPL or `import`).
616
-                 * @since v0.1.16
617
-                 * @deprecated Please use `require.main` and `module.children` instead.
618
-                 */
619
-                parent: Module | null | undefined;
620
-                /**
621
-                 * The directory name of the module. This is usually the same as the
622
-                 * `path.dirname()` of the `module.id`.
623
-                 * @since v11.14.0
624
-                 */
625
-                path: string;
626
-                /**
627
-                 * The search paths for the module.
628
-                 * @since v0.4.0
629
-                 */
630
-                paths: string[];
631
-                /**
632
-                 * The `module.require()` method provides a way to load a module as if
633
-                 * `require()` was called from the original module.
634
-                 * @since v0.5.1
635
-                 */
636
-                require(id: string): any;
637
-            }
638
-            interface Require {
639
-                /**
640
-                 * Used to import modules, `JSON`, and local files.
641
-                 * @since v0.1.13
642
-                 */
643
-                (id: string): any;
644
-                /**
645
-                 * Modules are cached in this object when they are required. By deleting a key
646
-                 * value from this object, the next `require` will reload the module.
647
-                 * This does not apply to
648
-                 * [native addons](https://nodejs.org/docs/latest-v25.x/api/addons.html),
649
-                 * for which reloading will result in an error.
650
-                 * @since v0.3.0
651
-                 */
652
-                cache: Dict<Module>;
653
-                /**
654
-                 * Instruct `require` on how to handle certain file extensions.
655
-                 * @since v0.3.0
656
-                 * @deprecated
657
-                 */
658
-                extensions: RequireExtensions;
659
-                /**
660
-                 * The `Module` object representing the entry script loaded when the Node.js
661
-                 * process launched, or `undefined` if the entry point of the program is not a
662
-                 * CommonJS module.
663
-                 * @since v0.1.17
664
-                 */
665
-                main: Module | undefined;
666
-                /**
667
-                 * @since v0.3.0
668
-                 */
669
-                resolve: RequireResolve;
670
-            }
671
-            /** @deprecated */
672
-            interface RequireExtensions extends Dict<(module: Module, filename: string) => any> {
673
-                ".js": (module: Module, filename: string) => any;
674
-                ".json": (module: Module, filename: string) => any;
675
-                ".node": (module: Module, filename: string) => any;
676
-            }
677
-            interface RequireResolveOptions {
678
-                /**
679
-                 * Paths to resolve module location from. If present, these
680
-                 * paths are used instead of the default resolution paths, with the exception
681
-                 * of
682
-                 * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v25.x/api/modules.html#loading-from-the-global-folders)
683
-                 * like `$HOME/.node_modules`, which are
684
-                 * always included. Each of these paths is used as a starting point for
685
-                 * the module resolution algorithm, meaning that the `node_modules` hierarchy
686
-                 * is checked from this location.
687
-                 * @since v8.9.0
688
-                 */
689
-                paths?: string[] | undefined;
690
-            }
691
-            interface RequireResolve {
692
-                /**
693
-                 * Use the internal `require()` machinery to look up the location of a module,
694
-                 * but rather than loading the module, just return the resolved filename.
695
-                 *
696
-                 * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown.
697
-                 * @since v0.3.0
698
-                 * @param request The module path to resolve.
699
-                 */
700
-                (request: string, options?: RequireResolveOptions): string;
701
-                /**
702
-                 * Returns an array containing the paths searched during resolution of `request` or
703
-                 * `null` if the `request` string references a core module, for example `http` or
704
-                 * `fs`.
705
-                 * @since v8.9.0
706
-                 * @param request The module path whose lookup paths are being retrieved.
707
-                 */
708
-                paths(request: string): string[] | null;
709
-            }
710
-        }
711
-        /**
712
-         * The directory name of the current module. This is the same as the
713
-         * `path.dirname()` of the `__filename`.
714
-         * @since v0.1.27
715
-         */
716
-        var __dirname: string;
717
-        /**
718
-         * The file name of the current module. This is the current module file's absolute
719
-         * path with symlinks resolved.
720
-         *
721
-         * For a main program this is not necessarily the same as the file name used in the
722
-         * command line.
723
-         * @since v0.0.1
724
-         */
725
-        var __filename: string;
726
-        /**
727
-         * The `exports` variable is available within a module's file-level scope, and is
728
-         * assigned the value of `module.exports` before the module is evaluated.
729
-         * @since v0.1.16
730
-         */
731
-        var exports: NodeJS.Module["exports"];
732
-        /**
733
-         * A reference to the current module.
734
-         * @since v0.1.16
735
-         */
736
-        var module: NodeJS.Module;
737
-        /**
738
-         * @since v0.1.13
739
-         */
740
-        var require: NodeJS.Require;
741
-        // Global-scope aliases for backwards compatibility with @types/node <13.0.x
742
-        // TODO: consider removing in a future major version update
743
-        /** @deprecated Use `NodeJS.Module` instead. */
744
-        interface NodeModule extends NodeJS.Module {}
745
-        /** @deprecated Use `NodeJS.Require` instead. */
746
-        interface NodeRequire extends NodeJS.Require {}
747
-        /** @deprecated Use `NodeJS.RequireResolve` instead. */
748
-        interface RequireResolve extends NodeJS.RequireResolve {}
749
-    }
750
-    export = Module;
751
-}
752
-declare module "module" {
753
-    import module = require("node:module");
754
-    export = module;
755
-}

+ 0 - 970
test/node_modules/@types/node/net.d.ts

@@ -1,970 +0,0 @@
1
-declare module "node:net" {
2
-    import { NonSharedBuffer } from "node:buffer";
3
-    import * as dns from "node:dns";
4
-    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
5
-    import * as stream from "node:stream";
6
-    type LookupFunction = (
7
-        hostname: string,
8
-        options: dns.LookupOptions,
9
-        callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void,
10
-    ) => void;
11
-    interface AddressInfo {
12
-        address: string;
13
-        family: string;
14
-        port: number;
15
-    }
16
-    interface SocketConstructorOpts {
17
-        fd?: number | undefined;
18
-        allowHalfOpen?: boolean | undefined;
19
-        onread?: OnReadOpts | undefined;
20
-        readable?: boolean | undefined;
21
-        writable?: boolean | undefined;
22
-        signal?: AbortSignal | undefined;
23
-        noDelay?: boolean | undefined;
24
-        keepAlive?: boolean | undefined;
25
-        keepAliveInitialDelay?: number | undefined;
26
-        blockList?: BlockList | undefined;
27
-        typeOfService?: number | undefined;
28
-    }
29
-    interface OnReadOpts {
30
-        buffer: Uint8Array | (() => Uint8Array);
31
-        /**
32
-         * This function is called for every chunk of incoming data.
33
-         * Two arguments are passed to it: the number of bytes written to `buffer` and a reference to `buffer`.
34
-         * Return `false` from this function to implicitly `pause()` the socket.
35
-         */
36
-        callback(bytesWritten: number, buffer: Uint8Array): boolean;
37
-    }
38
-    interface TcpSocketConnectOpts {
39
-        port: number;
40
-        host?: string | undefined;
41
-        localAddress?: string | undefined;
42
-        localPort?: number | undefined;
43
-        hints?: number | undefined;
44
-        family?: number | undefined;
45
-        lookup?: LookupFunction | undefined;
46
-        /**
47
-         * @since v18.13.0
48
-         */
49
-        autoSelectFamily?: boolean | undefined;
50
-        /**
51
-         * @since v18.13.0
52
-         */
53
-        autoSelectFamilyAttemptTimeout?: number | undefined;
54
-    }
55
-    interface IpcSocketConnectOpts {
56
-        path: string;
57
-    }
58
-    type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
59
-    type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
60
-    interface SocketEventMap extends Omit<stream.DuplexEventMap, "close"> {
61
-        "close": [hadError: boolean];
62
-        "connect": [];
63
-        "connectionAttempt": [ip: string, port: number, family: number];
64
-        "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error];
65
-        "connectionAttemptTimeout": [ip: string, port: number, family: number];
66
-        "data": [data: string | NonSharedBuffer];
67
-        "lookup": [err: Error | null, address: string, family: number | null, host: string];
68
-        "ready": [];
69
-        "timeout": [];
70
-    }
71
-    /**
72
-     * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
73
-     * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
74
-     * an `EventEmitter`.
75
-     *
76
-     * A `net.Socket` can be created by the user and used directly to interact with
77
-     * a server. For example, it is returned by {@link createConnection},
78
-     * so the user can use it to talk to the server.
79
-     *
80
-     * It can also be created by Node.js and passed to the user when a connection
81
-     * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
82
-     * it to interact with the client.
83
-     * @since v0.3.4
84
-     */
85
-    class Socket extends stream.Duplex {
86
-        constructor(options?: SocketConstructorOpts);
87
-        /**
88
-         * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately.
89
-         * If the socket is still writable it implicitly calls `socket.end()`.
90
-         * @since v0.3.4
91
-         */
92
-        destroySoon(): void;
93
-        /**
94
-         * Sends data on the socket. The second parameter specifies the encoding in the
95
-         * case of a string. It defaults to UTF8 encoding.
96
-         *
97
-         * Returns `true` if the entire data was flushed successfully to the kernel
98
-         * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
99
-         *
100
-         * The optional `callback` parameter will be executed when the data is finally
101
-         * written out, which may not be immediately.
102
-         *
103
-         * See `Writable` stream `write()` method for more
104
-         * information.
105
-         * @since v0.1.90
106
-         */
107
-        write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
108
-        /**
109
-         * Sends data on the socket, with an explicit encoding for string data.
110
-         * @see {@link Socket.write} for full details.
111
-         * @since v0.1.90
112
-         * @param [encoding='utf8'] Only used when data is `string`.
113
-         */
114
-        write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
115
-        /**
116
-         * Initiate a connection on a given socket.
117
-         *
118
-         * Possible signatures:
119
-         *
120
-         * * `socket.connect(options[, connectListener])`
121
-         * * `socket.connect(path[, connectListener])` for `IPC` connections.
122
-         * * `socket.connect(port[, host][, connectListener])` for TCP connections.
123
-         * * Returns: `net.Socket` The socket itself.
124
-         *
125
-         * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
126
-         * instead of a `'connect'` event, an `'error'` event will be emitted with
127
-         * the error passed to the `'error'` listener.
128
-         * The last parameter `connectListener`, if supplied, will be added as a listener
129
-         * for the `'connect'` event **once**.
130
-         *
131
-         * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
132
-         * behavior.
133
-         */
134
-        connect(options: SocketConnectOpts, connectionListener?: () => void): this;
135
-        connect(port: number, host: string, connectionListener?: () => void): this;
136
-        connect(port: number, connectionListener?: () => void): this;
137
-        connect(path: string, connectionListener?: () => void): this;
138
-        /**
139
-         * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
140
-         * @since v0.1.90
141
-         * @return The socket itself.
142
-         */
143
-        setEncoding(encoding?: BufferEncoding): this;
144
-        /**
145
-         * Pauses the reading of data. That is, `'data'` events will not be emitted.
146
-         * Useful to throttle back an upload.
147
-         * @return The socket itself.
148
-         */
149
-        pause(): this;
150
-        /**
151
-         * Close the TCP connection by sending an RST packet and destroy the stream.
152
-         * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
153
-         * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
154
-         * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
155
-         * @since v18.3.0, v16.17.0
156
-         */
157
-        resetAndDestroy(): this;
158
-        /**
159
-         * Resumes reading after a call to `socket.pause()`.
160
-         * @return The socket itself.
161
-         */
162
-        resume(): this;
163
-        /**
164
-         * Sets the socket to timeout after `timeout` milliseconds of inactivity on
165
-         * the socket. By default `net.Socket` do not have a timeout.
166
-         *
167
-         * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
168
-         * end the connection.
169
-         *
170
-         * ```js
171
-         * socket.setTimeout(3000);
172
-         * socket.on('timeout', () => {
173
-         *   console.log('socket timeout');
174
-         *   socket.end();
175
-         * });
176
-         * ```
177
-         *
178
-         * If `timeout` is 0, then the existing idle timeout is disabled.
179
-         *
180
-         * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
181
-         * @since v0.1.90
182
-         * @return The socket itself.
183
-         */
184
-        setTimeout(timeout: number, callback?: () => void): this;
185
-        /**
186
-         * Enable/disable the use of Nagle's algorithm.
187
-         *
188
-         * When a TCP connection is created, it will have Nagle's algorithm enabled.
189
-         *
190
-         * Nagle's algorithm delays data before it is sent via the network. It attempts
191
-         * to optimize throughput at the expense of latency.
192
-         *
193
-         * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
194
-         * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
195
-         * algorithm.
196
-         * @since v0.1.90
197
-         * @param [noDelay=true]
198
-         * @return The socket itself.
199
-         */
200
-        setNoDelay(noDelay?: boolean): this;
201
-        /**
202
-         * Enable/disable keep-alive functionality, and optionally set the initial
203
-         * delay before the first keepalive probe is sent on an idle socket.
204
-         *
205
-         * Set `initialDelay` (in milliseconds) to set the delay between the last
206
-         * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
207
-         * (or previous) setting.
208
-         *
209
-         * Enabling the keep-alive functionality will set the following socket options:
210
-         *
211
-         * * `SO_KEEPALIVE=1`
212
-         * * `TCP_KEEPIDLE=initialDelay`
213
-         * * `TCP_KEEPCNT=10`
214
-         * * `TCP_KEEPINTVL=1`
215
-         * @since v0.1.92
216
-         * @param [enable=false]
217
-         * @param [initialDelay=0]
218
-         * @return The socket itself.
219
-         */
220
-        setKeepAlive(enable?: boolean, initialDelay?: number): this;
221
-        /**
222
-         * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic
223
-         * Class for IPv6 packets for this socket.
224
-         *
225
-         * `setTypeOfService()` may be called before the socket is connected; the value
226
-         * will be cached and applied when the socket establishes a connection.
227
-         * `getTypeOfService()` will return the currently set value even before connection.
228
-         *
229
-         * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
230
-         * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
231
-         * should verify platform-specific semantics.
232
-         * @since v25.6.0
233
-         * @returns The current TOS value.
234
-         */
235
-        getTypeOfService(): number;
236
-        /**
237
-         * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6
238
-         * Packets sent from this socket. This can be used to prioritize network traffic.
239
-         *
240
-         * `setTypeOfService()` may be called before the socket is connected; the value
241
-         * will be cached and applied when the socket establishes a connection.
242
-         * `getTypeOfService()` will return the currently set value even before connection.
243
-         *
244
-         * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
245
-         * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
246
-         * should verify platform-specific semantics.
247
-         * @since v25.6.0
248
-         * @param tos The TOS value to set (0-255).
249
-         * @returns The socket itself.
250
-         */
251
-        setTypeOfService(tos: number): this;
252
-        /**
253
-         * Returns the bound `address`, the address `family` name and `port` of the
254
-         * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
255
-         * @since v0.1.90
256
-         */
257
-        address(): AddressInfo | {};
258
-        /**
259
-         * Calling `unref()` on a socket will allow the program to exit if this is the only
260
-         * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
261
-         * @since v0.9.1
262
-         * @return The socket itself.
263
-         */
264
-        unref(): this;
265
-        /**
266
-         * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
267
-         * If the socket is `ref`ed calling `ref` again will have no effect.
268
-         * @since v0.9.1
269
-         * @return The socket itself.
270
-         */
271
-        ref(): this;
272
-        /**
273
-         * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)`
274
-         * and it is an array of the addresses that have been attempted.
275
-         *
276
-         * Each address is a string in the form of `$IP:$PORT`.
277
-         * If the connection was successful, then the last address is the one that the socket is currently connected to.
278
-         * @since v19.4.0
279
-         */
280
-        readonly autoSelectFamilyAttemptedAddresses: string[];
281
-        /**
282
-         * This property shows the number of characters buffered for writing. The buffer
283
-         * may contain strings whose length after encoding is not yet known. So this number
284
-         * is only an approximation of the number of bytes in the buffer.
285
-         *
286
-         * `net.Socket` has the property that `socket.write()` always works. This is to
287
-         * help users get up and running quickly. The computer cannot always keep up
288
-         * with the amount of data that is written to a socket. The network connection
289
-         * simply might be too slow. Node.js will internally queue up the data written to a
290
-         * socket and send it out over the wire when it is possible.
291
-         *
292
-         * The consequence of this internal buffering is that memory may grow.
293
-         * Users who experience large or growing `bufferSize` should attempt to
294
-         * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
295
-         * @since v0.3.8
296
-         * @deprecated Since v14.6.0 - Use `writableLength` instead.
297
-         */
298
-        readonly bufferSize: number;
299
-        /**
300
-         * The amount of received bytes.
301
-         * @since v0.5.3
302
-         */
303
-        readonly bytesRead: number;
304
-        /**
305
-         * The amount of bytes sent.
306
-         * @since v0.5.3
307
-         */
308
-        readonly bytesWritten: number;
309
-        /**
310
-         * If `true`, `socket.connect(options[, connectListener])` was
311
-         * called and has not yet finished. It will stay `true` until the socket becomes
312
-         * connected, then it is set to `false` and the `'connect'` event is emitted. Note
313
-         * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
314
-         * @since v6.1.0
315
-         */
316
-        readonly connecting: boolean;
317
-        /**
318
-         * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
319
-         * (see `socket.connecting`).
320
-         * @since v11.2.0, v10.16.0
321
-         */
322
-        readonly pending: boolean;
323
-        /**
324
-         * See `writable.destroyed` for further details.
325
-         */
326
-        readonly destroyed: boolean;
327
-        /**
328
-         * The string representation of the local IP address the remote client is
329
-         * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
330
-         * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
331
-         * @since v0.9.6
332
-         */
333
-        readonly localAddress?: string;
334
-        /**
335
-         * The numeric representation of the local port. For example, `80` or `21`.
336
-         * @since v0.9.6
337
-         */
338
-        readonly localPort?: number;
339
-        /**
340
-         * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
341
-         * @since v18.8.0, v16.18.0
342
-         */
343
-        readonly localFamily?: string;
344
-        /**
345
-         * This property represents the state of the connection as a string.
346
-         *
347
-         * * If the stream is connecting `socket.readyState` is `opening`.
348
-         * * If the stream is readable and writable, it is `open`.
349
-         * * If the stream is readable and not writable, it is `readOnly`.
350
-         * * If the stream is not readable and writable, it is `writeOnly`.
351
-         * @since v0.5.0
352
-         */
353
-        readonly readyState: SocketReadyState;
354
-        /**
355
-         * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
356
-         * the socket is destroyed (for example, if the client disconnected).
357
-         * @since v0.5.10
358
-         */
359
-        readonly remoteAddress: string | undefined;
360
-        /**
361
-         * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
362
-         * the socket is destroyed (for example, if the client disconnected).
363
-         * @since v0.11.14
364
-         */
365
-        readonly remoteFamily: string | undefined;
366
-        /**
367
-         * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
368
-         * the socket is destroyed (for example, if the client disconnected).
369
-         * @since v0.5.10
370
-         */
371
-        readonly remotePort: number | undefined;
372
-        /**
373
-         * The socket timeout in milliseconds as set by `socket.setTimeout()`.
374
-         * It is `undefined` if a timeout has not been set.
375
-         * @since v10.7.0
376
-         */
377
-        readonly timeout?: number;
378
-        /**
379
-         * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
380
-         * server will still send some data.
381
-         *
382
-         * See `writable.end()` for further details.
383
-         * @since v0.1.90
384
-         * @param callback Optional callback for when the socket is finished.
385
-         * @return The socket itself.
386
-         */
387
-        end(callback?: () => void): this;
388
-        /**
389
-         * Half-closes the socket, with one final chunk of data.
390
-         * @see {@link Socket.end} for full details.
391
-         * @since v0.1.90
392
-         * @param callback Optional callback for when the socket is finished.
393
-         * @return The socket itself.
394
-         */
395
-        end(buffer: Uint8Array | string, callback?: () => void): this;
396
-        /**
397
-         * Half-closes the socket, with one final chunk of data.
398
-         * @see {@link Socket.end} for full details.
399
-         * @since v0.1.90
400
-         * @param [encoding='utf8'] Only used when data is `string`.
401
-         * @param callback Optional callback for when the socket is finished.
402
-         * @return The socket itself.
403
-         */
404
-        end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
405
-        // #region InternalEventEmitter
406
-        addListener<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
407
-        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
408
-        emit<E extends keyof SocketEventMap>(eventName: E, ...args: SocketEventMap[E]): boolean;
409
-        emit(eventName: string | symbol, ...args: any[]): boolean;
410
-        listenerCount<E extends keyof SocketEventMap>(
411
-            eventName: E,
412
-            listener?: (...args: SocketEventMap[E]) => void,
413
-        ): number;
414
-        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
415
-        listeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
416
-        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
417
-        off<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
418
-        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
419
-        on<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
420
-        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
421
-        once<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
422
-        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
423
-        prependListener<E extends keyof SocketEventMap>(
424
-            eventName: E,
425
-            listener: (...args: SocketEventMap[E]) => void,
426
-        ): this;
427
-        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
428
-        prependOnceListener<E extends keyof SocketEventMap>(
429
-            eventName: E,
430
-            listener: (...args: SocketEventMap[E]) => void,
431
-        ): this;
432
-        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
433
-        rawListeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
434
-        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
435
-        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
436
-        removeAllListeners<E extends keyof SocketEventMap>(eventName?: E): this;
437
-        removeAllListeners(eventName?: string | symbol): this;
438
-        removeListener<E extends keyof SocketEventMap>(
439
-            eventName: E,
440
-            listener: (...args: SocketEventMap[E]) => void,
441
-        ): this;
442
-        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
443
-        // #endregion
444
-    }
445
-    interface ListenOptions extends Abortable {
446
-        backlog?: number | undefined;
447
-        exclusive?: boolean | undefined;
448
-        host?: string | undefined;
449
-        /**
450
-         * @default false
451
-         */
452
-        ipv6Only?: boolean | undefined;
453
-        reusePort?: boolean | undefined;
454
-        path?: string | undefined;
455
-        port?: number | undefined;
456
-        readableAll?: boolean | undefined;
457
-        writableAll?: boolean | undefined;
458
-    }
459
-    interface ServerOpts {
460
-        /**
461
-         * Indicates whether half-opened TCP connections are allowed.
462
-         * @default false
463
-         */
464
-        allowHalfOpen?: boolean | undefined;
465
-        /**
466
-         * Indicates whether the socket should be paused on incoming connections.
467
-         * @default false
468
-         */
469
-        pauseOnConnect?: boolean | undefined;
470
-        /**
471
-         * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
472
-         * @default false
473
-         * @since v16.5.0
474
-         */
475
-        noDelay?: boolean | undefined;
476
-        /**
477
-         * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
478
-         * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
479
-         * @default false
480
-         * @since v16.5.0
481
-         */
482
-        keepAlive?: boolean | undefined;
483
-        /**
484
-         * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
485
-         * @default 0
486
-         * @since v16.5.0
487
-         */
488
-        keepAliveInitialDelay?: number | undefined;
489
-        /**
490
-         * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
491
-         * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
492
-         * @since v18.17.0, v20.1.0
493
-         */
494
-        highWaterMark?: number | undefined;
495
-        /**
496
-         * `blockList` can be used for disabling inbound
497
-         * access to specific IP addresses, IP ranges, or IP subnets. This does not
498
-         * work if the server is behind a reverse proxy, NAT, etc. because the address
499
-         * checked against the block list is the address of the proxy, or the one
500
-         * specified by the NAT.
501
-         * @since v22.13.0
502
-         */
503
-        blockList?: BlockList | undefined;
504
-    }
505
-    interface DropArgument {
506
-        localAddress?: string;
507
-        localPort?: number;
508
-        localFamily?: string;
509
-        remoteAddress?: string;
510
-        remotePort?: number;
511
-        remoteFamily?: string;
512
-    }
513
-    interface ServerEventMap {
514
-        "close": [];
515
-        "connection": [socket: Socket];
516
-        "error": [err: Error];
517
-        "listening": [];
518
-        "drop": [data?: DropArgument];
519
-    }
520
-    /**
521
-     * This class is used to create a TCP or `IPC` server.
522
-     * @since v0.1.90
523
-     */
524
-    class Server implements EventEmitter {
525
-        constructor(connectionListener?: (socket: Socket) => void);
526
-        constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
527
-        /**
528
-         * Start a server listening for connections. A `net.Server` can be a TCP or
529
-         * an `IPC` server depending on what it listens to.
530
-         *
531
-         * Possible signatures:
532
-         *
533
-         * * `server.listen(handle[, backlog][, callback])`
534
-         * * `server.listen(options[, callback])`
535
-         * * `server.listen(path[, backlog][, callback])` for `IPC` servers
536
-         * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
537
-         *
538
-         * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
539
-         * event.
540
-         *
541
-         * All `listen()` methods can take a `backlog` parameter to specify the maximum
542
-         * length of the queue of pending connections. The actual length will be determined
543
-         * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512).
544
-         *
545
-         * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
546
-         * details).
547
-         *
548
-         * The `server.listen()` method can be called again if and only if there was an
549
-         * error during the first `server.listen()` call or `server.close()` has been
550
-         * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
551
-         *
552
-         * One of the most common errors raised when listening is `EADDRINUSE`.
553
-         * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
554
-         * after a certain amount of time:
555
-         *
556
-         * ```js
557
-         * server.on('error', (e) => {
558
-         *   if (e.code === 'EADDRINUSE') {
559
-         *     console.error('Address in use, retrying...');
560
-         *     setTimeout(() => {
561
-         *       server.close();
562
-         *       server.listen(PORT, HOST);
563
-         *     }, 1000);
564
-         *   }
565
-         * });
566
-         * ```
567
-         */
568
-        listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
569
-        listen(port?: number, hostname?: string, listeningListener?: () => void): this;
570
-        listen(port?: number, backlog?: number, listeningListener?: () => void): this;
571
-        listen(port?: number, listeningListener?: () => void): this;
572
-        listen(path: string, backlog?: number, listeningListener?: () => void): this;
573
-        listen(path: string, listeningListener?: () => void): this;
574
-        listen(options: ListenOptions, listeningListener?: () => void): this;
575
-        listen(handle: any, backlog?: number, listeningListener?: () => void): this;
576
-        listen(handle: any, listeningListener?: () => void): this;
577
-        /**
578
-         * Stops the server from accepting new connections and keeps existing
579
-         * connections. This function is asynchronous, the server is finally closed
580
-         * when all connections are ended and the server emits a `'close'` event.
581
-         * The optional `callback` will be called once the `'close'` event occurs. Unlike
582
-         * that event, it will be called with an `Error` as its only argument if the server
583
-         * was not open when it was closed.
584
-         * @since v0.1.90
585
-         * @param callback Called when the server is closed.
586
-         */
587
-        close(callback?: (err?: Error) => void): this;
588
-        /**
589
-         * Returns the bound `address`, the address `family` name, and `port` of the server
590
-         * as reported by the operating system if listening on an IP socket
591
-         * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
592
-         *
593
-         * For a server listening on a pipe or Unix domain socket, the name is returned
594
-         * as a string.
595
-         *
596
-         * ```js
597
-         * const server = net.createServer((socket) => {
598
-         *   socket.end('goodbye\n');
599
-         * }).on('error', (err) => {
600
-         *   // Handle errors here.
601
-         *   throw err;
602
-         * });
603
-         *
604
-         * // Grab an arbitrary unused port.
605
-         * server.listen(() => {
606
-         *   console.log('opened server on', server.address());
607
-         * });
608
-         * ```
609
-         *
610
-         * `server.address()` returns `null` before the `'listening'` event has been
611
-         * emitted or after calling `server.close()`.
612
-         * @since v0.1.90
613
-         */
614
-        address(): AddressInfo | string | null;
615
-        /**
616
-         * Asynchronously get the number of concurrent connections on the server. Works
617
-         * when sockets were sent to forks.
618
-         *
619
-         * Callback should take two arguments `err` and `count`.
620
-         * @since v0.9.7
621
-         */
622
-        getConnections(cb: (error: Error | null, count: number) => void): this;
623
-        /**
624
-         * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
625
-         * If the server is `ref`ed calling `ref()` again will have no effect.
626
-         * @since v0.9.1
627
-         */
628
-        ref(): this;
629
-        /**
630
-         * Calling `unref()` on a server will allow the program to exit if this is the only
631
-         * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
632
-         * @since v0.9.1
633
-         */
634
-        unref(): this;
635
-        /**
636
-         * Set this property to reject connections when the server's connection count gets
637
-         * high.
638
-         *
639
-         * It is not recommended to use this option once a socket has been sent to a child
640
-         * with `child_process.fork()`.
641
-         * @since v0.2.0
642
-         */
643
-        maxConnections: number;
644
-        connections: number;
645
-        /**
646
-         * Indicates whether or not the server is listening for connections.
647
-         * @since v5.7.0
648
-         */
649
-        readonly listening: boolean;
650
-        /**
651
-         * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
652
-         * @since v20.5.0
653
-         */
654
-        [Symbol.asyncDispose](): Promise<void>;
655
-    }
656
-    interface Server extends InternalEventEmitter<ServerEventMap> {}
657
-    type IPVersion = "ipv4" | "ipv6";
658
-    /**
659
-     * The `BlockList` object can be used with some network APIs to specify rules for
660
-     * disabling inbound or outbound access to specific IP addresses, IP ranges, or
661
-     * IP subnets.
662
-     * @since v15.0.0, v14.18.0
663
-     */
664
-    class BlockList {
665
-        /**
666
-         * Adds a rule to block the given IP address.
667
-         * @since v15.0.0, v14.18.0
668
-         * @param address An IPv4 or IPv6 address.
669
-         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
670
-         */
671
-        addAddress(address: string, type?: IPVersion): void;
672
-        addAddress(address: SocketAddress): void;
673
-        /**
674
-         * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
675
-         * @since v15.0.0, v14.18.0
676
-         * @param start The starting IPv4 or IPv6 address in the range.
677
-         * @param end The ending IPv4 or IPv6 address in the range.
678
-         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
679
-         */
680
-        addRange(start: string, end: string, type?: IPVersion): void;
681
-        addRange(start: SocketAddress, end: SocketAddress): void;
682
-        /**
683
-         * Adds a rule to block a range of IP addresses specified as a subnet mask.
684
-         * @since v15.0.0, v14.18.0
685
-         * @param net The network IPv4 or IPv6 address.
686
-         * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
687
-         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
688
-         */
689
-        addSubnet(net: SocketAddress, prefix: number): void;
690
-        addSubnet(net: string, prefix: number, type?: IPVersion): void;
691
-        /**
692
-         * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
693
-         *
694
-         * ```js
695
-         * const blockList = new net.BlockList();
696
-         * blockList.addAddress('123.123.123.123');
697
-         * blockList.addRange('10.0.0.1', '10.0.0.10');
698
-         * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
699
-         *
700
-         * console.log(blockList.check('123.123.123.123'));  // Prints: true
701
-         * console.log(blockList.check('10.0.0.3'));  // Prints: true
702
-         * console.log(blockList.check('222.111.111.222'));  // Prints: false
703
-         *
704
-         * // IPv6 notation for IPv4 addresses works:
705
-         * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
706
-         * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
707
-         * ```
708
-         * @since v15.0.0, v14.18.0
709
-         * @param address The IP address to check
710
-         * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
711
-         */
712
-        check(address: SocketAddress): boolean;
713
-        check(address: string, type?: IPVersion): boolean;
714
-        /**
715
-         * The list of rules added to the blocklist.
716
-         * @since v15.0.0, v14.18.0
717
-         */
718
-        rules: readonly string[];
719
-        /**
720
-         * Returns `true` if the `value` is a `net.BlockList`.
721
-         * @since v22.13.0
722
-         * @param value Any JS value
723
-         */
724
-        static isBlockList(value: unknown): value is BlockList;
725
-        /**
726
-         * ```js
727
-         * const blockList = new net.BlockList();
728
-         * const data = [
729
-         *   'Subnet: IPv4 192.168.1.0/24',
730
-         *   'Address: IPv4 10.0.0.5',
731
-         *   'Range: IPv4 192.168.2.1-192.168.2.10',
732
-         *   'Range: IPv4 10.0.0.1-10.0.0.10',
733
-         * ];
734
-         * blockList.fromJSON(data);
735
-         * blockList.fromJSON(JSON.stringify(data));
736
-         * ```
737
-         * @since v24.5.0
738
-         * @experimental
739
-         */
740
-        fromJSON(data: string | readonly string[]): void;
741
-        /**
742
-         * @since v24.5.0
743
-         * @experimental
744
-         */
745
-        toJSON(): readonly string[];
746
-    }
747
-    interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
748
-        timeout?: number | undefined;
749
-    }
750
-    interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
751
-        timeout?: number | undefined;
752
-    }
753
-    type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
754
-    /**
755
-     * Creates a new TCP or `IPC` server.
756
-     *
757
-     * If `allowHalfOpen` is set to `true`, when the other end of the socket
758
-     * signals the end of transmission, the server will only send back the end of
759
-     * transmission when `socket.end()` is explicitly called. For example, in the
760
-     * context of TCP, when a FIN packed is received, a FIN packed is sent
761
-     * back only when `socket.end()` is explicitly called. Until then the
762
-     * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
763
-     *
764
-     * If `pauseOnConnect` is set to `true`, then the socket associated with each
765
-     * incoming connection will be paused, and no data will be read from its handle.
766
-     * This allows connections to be passed between processes without any data being
767
-     * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
768
-     *
769
-     * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
770
-     *
771
-     * Here is an example of a TCP echo server which listens for connections
772
-     * on port 8124:
773
-     *
774
-     * ```js
775
-     * import net from 'node:net';
776
-     * const server = net.createServer((c) => {
777
-     *   // 'connection' listener.
778
-     *   console.log('client connected');
779
-     *   c.on('end', () => {
780
-     *     console.log('client disconnected');
781
-     *   });
782
-     *   c.write('hello\r\n');
783
-     *   c.pipe(c);
784
-     * });
785
-     * server.on('error', (err) => {
786
-     *   throw err;
787
-     * });
788
-     * server.listen(8124, () => {
789
-     *   console.log('server bound');
790
-     * });
791
-     * ```
792
-     *
793
-     * Test this by using `telnet`:
794
-     *
795
-     * ```bash
796
-     * telnet localhost 8124
797
-     * ```
798
-     *
799
-     * To listen on the socket `/tmp/echo.sock`:
800
-     *
801
-     * ```js
802
-     * server.listen('/tmp/echo.sock', () => {
803
-     *   console.log('server bound');
804
-     * });
805
-     * ```
806
-     *
807
-     * Use `nc` to connect to a Unix domain socket server:
808
-     *
809
-     * ```bash
810
-     * nc -U /tmp/echo.sock
811
-     * ```
812
-     * @since v0.5.0
813
-     * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
814
-     */
815
-    function createServer(connectionListener?: (socket: Socket) => void): Server;
816
-    function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
817
-    /**
818
-     * Aliases to {@link createConnection}.
819
-     *
820
-     * Possible signatures:
821
-     *
822
-     * * {@link connect}
823
-     * * {@link connect} for `IPC` connections.
824
-     * * {@link connect} for TCP connections.
825
-     */
826
-    function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
827
-    function connect(port: number, host?: string, connectionListener?: () => void): Socket;
828
-    function connect(path: string, connectionListener?: () => void): Socket;
829
-    /**
830
-     * A factory function, which creates a new {@link Socket},
831
-     * immediately initiates connection with `socket.connect()`,
832
-     * then returns the `net.Socket` that starts the connection.
833
-     *
834
-     * When the connection is established, a `'connect'` event will be emitted
835
-     * on the returned socket. The last parameter `connectListener`, if supplied,
836
-     * will be added as a listener for the `'connect'` event **once**.
837
-     *
838
-     * Possible signatures:
839
-     *
840
-     * * {@link createConnection}
841
-     * * {@link createConnection} for `IPC` connections.
842
-     * * {@link createConnection} for TCP connections.
843
-     *
844
-     * The {@link connect} function is an alias to this function.
845
-     */
846
-    function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
847
-    function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
848
-    function createConnection(path: string, connectionListener?: () => void): Socket;
849
-    /**
850
-     * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`.
851
-     * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided.
852
-     * @since v19.4.0
853
-     */
854
-    function getDefaultAutoSelectFamily(): boolean;
855
-    /**
856
-     * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`.
857
-     * @param value The new default value.
858
-     * The initial default value is `true`, unless the command line option
859
-     * `--no-network-family-autoselection` is provided.
860
-     * @since v19.4.0
861
-     */
862
-    function setDefaultAutoSelectFamily(value: boolean): void;
863
-    /**
864
-     * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
865
-     * The initial default value is `500` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
866
-     * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
867
-     * @since v19.8.0, v18.8.0
868
-     */
869
-    function getDefaultAutoSelectFamilyAttemptTimeout(): number;
870
-    /**
871
-     * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
872
-     * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line
873
-     * option `--network-family-autoselection-attempt-timeout`.
874
-     * @since v19.8.0, v18.8.0
875
-     */
876
-    function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void;
877
-    /**
878
-     * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
879
-     * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
880
-     *
881
-     * ```js
882
-     * net.isIP('::1'); // returns 6
883
-     * net.isIP('127.0.0.1'); // returns 4
884
-     * net.isIP('127.000.000.001'); // returns 0
885
-     * net.isIP('127.0.0.1/24'); // returns 0
886
-     * net.isIP('fhqwhgads'); // returns 0
887
-     * ```
888
-     * @since v0.3.0
889
-     */
890
-    function isIP(input: string): number;
891
-    /**
892
-     * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
893
-     * leading zeroes. Otherwise, returns `false`.
894
-     *
895
-     * ```js
896
-     * net.isIPv4('127.0.0.1'); // returns true
897
-     * net.isIPv4('127.000.000.001'); // returns false
898
-     * net.isIPv4('127.0.0.1/24'); // returns false
899
-     * net.isIPv4('fhqwhgads'); // returns false
900
-     * ```
901
-     * @since v0.3.0
902
-     */
903
-    function isIPv4(input: string): boolean;
904
-    /**
905
-     * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
906
-     *
907
-     * ```js
908
-     * net.isIPv6('::1'); // returns true
909
-     * net.isIPv6('fhqwhgads'); // returns false
910
-     * ```
911
-     * @since v0.3.0
912
-     */
913
-    function isIPv6(input: string): boolean;
914
-    interface SocketAddressInitOptions {
915
-        /**
916
-         * The network address as either an IPv4 or IPv6 string.
917
-         * @default 127.0.0.1
918
-         */
919
-        address?: string | undefined;
920
-        /**
921
-         * @default `'ipv4'`
922
-         */
923
-        family?: IPVersion | undefined;
924
-        /**
925
-         * An IPv6 flow-label used only if `family` is `'ipv6'`.
926
-         * @default 0
927
-         */
928
-        flowlabel?: number | undefined;
929
-        /**
930
-         * An IP port.
931
-         * @default 0
932
-         */
933
-        port?: number | undefined;
934
-    }
935
-    /**
936
-     * @since v15.14.0, v14.18.0
937
-     */
938
-    class SocketAddress {
939
-        constructor(options: SocketAddressInitOptions);
940
-        /**
941
-         * Either \`'ipv4'\` or \`'ipv6'\`.
942
-         * @since v15.14.0, v14.18.0
943
-         */
944
-        readonly address: string;
945
-        /**
946
-         * Either \`'ipv4'\` or \`'ipv6'\`.
947
-         * @since v15.14.0, v14.18.0
948
-         */
949
-        readonly family: IPVersion;
950
-        /**
951
-         * @since v15.14.0, v14.18.0
952
-         */
953
-        readonly port: number;
954
-        /**
955
-         * @since v15.14.0, v14.18.0
956
-         */
957
-        readonly flowlabel: number;
958
-        /**
959
-         * @since v22.13.0
960
-         * @param input An input string containing an IP address and optional port,
961
-         * e.g. `123.1.2.3:1234` or `[1::1]:1234`.
962
-         * @returns Returns a `SocketAddress` if parsing was successful.
963
-         * Otherwise returns `undefined`.
964
-         */
965
-        static parse(input: string): SocketAddress | undefined;
966
-    }
967
-}
968
-declare module "net" {
969
-    export * from "node:net";
970
-}

+ 0 - 498
test/node_modules/@types/node/os.d.ts

@@ -1,498 +0,0 @@
1
-declare module "node:os" {
2
-    import { NonSharedBuffer } from "buffer";
3
-    interface CpuInfo {
4
-        model: string;
5
-        speed: number;
6
-        times: {
7
-            /** The number of milliseconds the CPU has spent in user mode. */
8
-            user: number;
9
-            /** The number of milliseconds the CPU has spent in nice mode. */
10
-            nice: number;
11
-            /** The number of milliseconds the CPU has spent in sys mode. */
12
-            sys: number;
13
-            /** The number of milliseconds the CPU has spent in idle mode. */
14
-            idle: number;
15
-            /** The number of milliseconds the CPU has spent in irq mode. */
16
-            irq: number;
17
-        };
18
-    }
19
-    interface NetworkInterfaceBase {
20
-        address: string;
21
-        netmask: string;
22
-        mac: string;
23
-        internal: boolean;
24
-        cidr: string | null;
25
-        scopeid?: number;
26
-    }
27
-    interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
28
-        family: "IPv4";
29
-    }
30
-    interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
31
-        family: "IPv6";
32
-        scopeid: number;
33
-    }
34
-    interface UserInfo<T> {
35
-        username: T;
36
-        uid: number;
37
-        gid: number;
38
-        shell: T | null;
39
-        homedir: T;
40
-    }
41
-    type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
42
-    /**
43
-     * Returns the host name of the operating system as a string.
44
-     * @since v0.3.3
45
-     */
46
-    function hostname(): string;
47
-    /**
48
-     * Returns an array containing the 1, 5, and 15 minute load averages.
49
-     *
50
-     * The load average is a measure of system activity calculated by the operating
51
-     * system and expressed as a fractional number.
52
-     *
53
-     * The load average is a Unix-specific concept. On Windows, the return value is
54
-     * always `[0, 0, 0]`.
55
-     * @since v0.3.3
56
-     */
57
-    function loadavg(): number[];
58
-    /**
59
-     * Returns the system uptime in number of seconds.
60
-     * @since v0.3.3
61
-     */
62
-    function uptime(): number;
63
-    /**
64
-     * Returns the amount of free system memory in bytes as an integer.
65
-     * @since v0.3.3
66
-     */
67
-    function freemem(): number;
68
-    /**
69
-     * Returns the total amount of system memory in bytes as an integer.
70
-     * @since v0.3.3
71
-     */
72
-    function totalmem(): number;
73
-    /**
74
-     * Returns an array of objects containing information about each logical CPU core.
75
-     * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.
76
-     *
77
-     * The properties included on each object include:
78
-     *
79
-     * ```js
80
-     * [
81
-     *   {
82
-     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
83
-     *     speed: 2926,
84
-     *     times: {
85
-     *       user: 252020,
86
-     *       nice: 0,
87
-     *       sys: 30340,
88
-     *       idle: 1070356870,
89
-     *       irq: 0,
90
-     *     },
91
-     *   },
92
-     *   {
93
-     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
94
-     *     speed: 2926,
95
-     *     times: {
96
-     *       user: 306960,
97
-     *       nice: 0,
98
-     *       sys: 26980,
99
-     *       idle: 1071569080,
100
-     *       irq: 0,
101
-     *     },
102
-     *   },
103
-     *   {
104
-     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
105
-     *     speed: 2926,
106
-     *     times: {
107
-     *       user: 248450,
108
-     *       nice: 0,
109
-     *       sys: 21750,
110
-     *       idle: 1070919370,
111
-     *       irq: 0,
112
-     *     },
113
-     *   },
114
-     *   {
115
-     *     model: 'Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz',
116
-     *     speed: 2926,
117
-     *     times: {
118
-     *       user: 256880,
119
-     *       nice: 0,
120
-     *       sys: 19430,
121
-     *       idle: 1070905480,
122
-     *       irq: 20,
123
-     *     },
124
-     *   },
125
-     * ]
126
-     * ```
127
-     *
128
-     * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
129
-     * are always 0.
130
-     *
131
-     * `os.cpus().length` should not be used to calculate the amount of parallelism
132
-     * available to an application. Use {@link availableParallelism} for this purpose.
133
-     * @since v0.3.3
134
-     */
135
-    function cpus(): CpuInfo[];
136
-    /**
137
-     * Returns an estimate of the default amount of parallelism a program should use.
138
-     * Always returns a value greater than zero.
139
-     *
140
-     * 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).
141
-     * @since v19.4.0, v18.14.0
142
-     */
143
-    function availableParallelism(): number;
144
-    /**
145
-     * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
146
-     * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
147
-     *
148
-     * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
149
-     * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
150
-     * @since v0.3.3
151
-     */
152
-    function type(): string;
153
-    /**
154
-     * Returns the operating system as a string.
155
-     *
156
-     * 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
157
-     * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
158
-     * @since v0.3.3
159
-     */
160
-    function release(): string;
161
-    /**
162
-     * Returns an object containing network interfaces that have been assigned a
163
-     * network address.
164
-     *
165
-     * Each key on the returned object identifies a network interface. The associated
166
-     * value is an array of objects that each describe an assigned network address.
167
-     *
168
-     * The properties available on the assigned network address object include:
169
-     *
170
-     * ```js
171
-     * {
172
-     *   lo: [
173
-     *     {
174
-     *       address: '127.0.0.1',
175
-     *       netmask: '255.0.0.0',
176
-     *       family: 'IPv4',
177
-     *       mac: '00:00:00:00:00:00',
178
-     *       internal: true,
179
-     *       cidr: '127.0.0.1/8'
180
-     *     },
181
-     *     {
182
-     *       address: '::1',
183
-     *       netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
184
-     *       family: 'IPv6',
185
-     *       mac: '00:00:00:00:00:00',
186
-     *       scopeid: 0,
187
-     *       internal: true,
188
-     *       cidr: '::1/128'
189
-     *     }
190
-     *   ],
191
-     *   eth0: [
192
-     *     {
193
-     *       address: '192.168.1.108',
194
-     *       netmask: '255.255.255.0',
195
-     *       family: 'IPv4',
196
-     *       mac: '01:02:03:0a:0b:0c',
197
-     *       internal: false,
198
-     *       cidr: '192.168.1.108/24'
199
-     *     },
200
-     *     {
201
-     *       address: 'fe80::a00:27ff:fe4e:66a1',
202
-     *       netmask: 'ffff:ffff:ffff:ffff::',
203
-     *       family: 'IPv6',
204
-     *       mac: '01:02:03:0a:0b:0c',
205
-     *       scopeid: 1,
206
-     *       internal: false,
207
-     *       cidr: 'fe80::a00:27ff:fe4e:66a1/64'
208
-     *     }
209
-     *   ]
210
-     * }
211
-     * ```
212
-     * @since v0.6.0
213
-     */
214
-    function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
215
-    /**
216
-     * Returns the string path of the current user's home directory.
217
-     *
218
-     * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
219
-     * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
220
-     *
221
-     * On Windows, it uses the `USERPROFILE` environment variable if defined.
222
-     * Otherwise it uses the path to the profile directory of the current user.
223
-     * @since v2.3.0
224
-     */
225
-    function homedir(): string;
226
-    interface UserInfoOptions {
227
-        encoding?: BufferEncoding | "buffer" | undefined;
228
-    }
229
-    interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions {
230
-        encoding: "buffer";
231
-    }
232
-    interface UserInfoOptionsWithStringEncoding extends UserInfoOptions {
233
-        encoding?: BufferEncoding | undefined;
234
-    }
235
-    /**
236
-     * Returns information about the currently effective user. On POSIX platforms,
237
-     * this is typically a subset of the password file. The returned object includes
238
-     * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.
239
-     *
240
-     * The value of `homedir` returned by `os.userInfo()` is provided by the operating
241
-     * system. This differs from the result of `os.homedir()`, which queries
242
-     * environment variables for the home directory before falling back to the
243
-     * operating system response.
244
-     *
245
-     * Throws a [`SystemError`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
246
-     * @since v6.0.0
247
-     */
248
-    function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
249
-    function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
250
-    function userInfo(options: UserInfoOptions): UserInfo<string | NonSharedBuffer>;
251
-    type SignalConstants = {
252
-        [key in NodeJS.Signals]: number;
253
-    };
254
-    namespace constants {
255
-        const UV_UDP_REUSEADDR: number;
256
-        namespace signals {}
257
-        const signals: SignalConstants;
258
-        namespace errno {
259
-            const E2BIG: number;
260
-            const EACCES: number;
261
-            const EADDRINUSE: number;
262
-            const EADDRNOTAVAIL: number;
263
-            const EAFNOSUPPORT: number;
264
-            const EAGAIN: number;
265
-            const EALREADY: number;
266
-            const EBADF: number;
267
-            const EBADMSG: number;
268
-            const EBUSY: number;
269
-            const ECANCELED: number;
270
-            const ECHILD: number;
271
-            const ECONNABORTED: number;
272
-            const ECONNREFUSED: number;
273
-            const ECONNRESET: number;
274
-            const EDEADLK: number;
275
-            const EDESTADDRREQ: number;
276
-            const EDOM: number;
277
-            const EDQUOT: number;
278
-            const EEXIST: number;
279
-            const EFAULT: number;
280
-            const EFBIG: number;
281
-            const EHOSTUNREACH: number;
282
-            const EIDRM: number;
283
-            const EILSEQ: number;
284
-            const EINPROGRESS: number;
285
-            const EINTR: number;
286
-            const EINVAL: number;
287
-            const EIO: number;
288
-            const EISCONN: number;
289
-            const EISDIR: number;
290
-            const ELOOP: number;
291
-            const EMFILE: number;
292
-            const EMLINK: number;
293
-            const EMSGSIZE: number;
294
-            const EMULTIHOP: number;
295
-            const ENAMETOOLONG: number;
296
-            const ENETDOWN: number;
297
-            const ENETRESET: number;
298
-            const ENETUNREACH: number;
299
-            const ENFILE: number;
300
-            const ENOBUFS: number;
301
-            const ENODATA: number;
302
-            const ENODEV: number;
303
-            const ENOENT: number;
304
-            const ENOEXEC: number;
305
-            const ENOLCK: number;
306
-            const ENOLINK: number;
307
-            const ENOMEM: number;
308
-            const ENOMSG: number;
309
-            const ENOPROTOOPT: number;
310
-            const ENOSPC: number;
311
-            const ENOSR: number;
312
-            const ENOSTR: number;
313
-            const ENOSYS: number;
314
-            const ENOTCONN: number;
315
-            const ENOTDIR: number;
316
-            const ENOTEMPTY: number;
317
-            const ENOTSOCK: number;
318
-            const ENOTSUP: number;
319
-            const ENOTTY: number;
320
-            const ENXIO: number;
321
-            const EOPNOTSUPP: number;
322
-            const EOVERFLOW: number;
323
-            const EPERM: number;
324
-            const EPIPE: number;
325
-            const EPROTO: number;
326
-            const EPROTONOSUPPORT: number;
327
-            const EPROTOTYPE: number;
328
-            const ERANGE: number;
329
-            const EROFS: number;
330
-            const ESPIPE: number;
331
-            const ESRCH: number;
332
-            const ESTALE: number;
333
-            const ETIME: number;
334
-            const ETIMEDOUT: number;
335
-            const ETXTBSY: number;
336
-            const EWOULDBLOCK: number;
337
-            const EXDEV: number;
338
-            const WSAEINTR: number;
339
-            const WSAEBADF: number;
340
-            const WSAEACCES: number;
341
-            const WSAEFAULT: number;
342
-            const WSAEINVAL: number;
343
-            const WSAEMFILE: number;
344
-            const WSAEWOULDBLOCK: number;
345
-            const WSAEINPROGRESS: number;
346
-            const WSAEALREADY: number;
347
-            const WSAENOTSOCK: number;
348
-            const WSAEDESTADDRREQ: number;
349
-            const WSAEMSGSIZE: number;
350
-            const WSAEPROTOTYPE: number;
351
-            const WSAENOPROTOOPT: number;
352
-            const WSAEPROTONOSUPPORT: number;
353
-            const WSAESOCKTNOSUPPORT: number;
354
-            const WSAEOPNOTSUPP: number;
355
-            const WSAEPFNOSUPPORT: number;
356
-            const WSAEAFNOSUPPORT: number;
357
-            const WSAEADDRINUSE: number;
358
-            const WSAEADDRNOTAVAIL: number;
359
-            const WSAENETDOWN: number;
360
-            const WSAENETUNREACH: number;
361
-            const WSAENETRESET: number;
362
-            const WSAECONNABORTED: number;
363
-            const WSAECONNRESET: number;
364
-            const WSAENOBUFS: number;
365
-            const WSAEISCONN: number;
366
-            const WSAENOTCONN: number;
367
-            const WSAESHUTDOWN: number;
368
-            const WSAETOOMANYREFS: number;
369
-            const WSAETIMEDOUT: number;
370
-            const WSAECONNREFUSED: number;
371
-            const WSAELOOP: number;
372
-            const WSAENAMETOOLONG: number;
373
-            const WSAEHOSTDOWN: number;
374
-            const WSAEHOSTUNREACH: number;
375
-            const WSAENOTEMPTY: number;
376
-            const WSAEPROCLIM: number;
377
-            const WSAEUSERS: number;
378
-            const WSAEDQUOT: number;
379
-            const WSAESTALE: number;
380
-            const WSAEREMOTE: number;
381
-            const WSASYSNOTREADY: number;
382
-            const WSAVERNOTSUPPORTED: number;
383
-            const WSANOTINITIALISED: number;
384
-            const WSAEDISCON: number;
385
-            const WSAENOMORE: number;
386
-            const WSAECANCELLED: number;
387
-            const WSAEINVALIDPROCTABLE: number;
388
-            const WSAEINVALIDPROVIDER: number;
389
-            const WSAEPROVIDERFAILEDINIT: number;
390
-            const WSASYSCALLFAILURE: number;
391
-            const WSASERVICE_NOT_FOUND: number;
392
-            const WSATYPE_NOT_FOUND: number;
393
-            const WSA_E_NO_MORE: number;
394
-            const WSA_E_CANCELLED: number;
395
-            const WSAEREFUSED: number;
396
-        }
397
-        namespace dlopen {
398
-            const RTLD_LAZY: number;
399
-            const RTLD_NOW: number;
400
-            const RTLD_GLOBAL: number;
401
-            const RTLD_LOCAL: number;
402
-            const RTLD_DEEPBIND: number;
403
-        }
404
-        namespace priority {
405
-            const PRIORITY_LOW: number;
406
-            const PRIORITY_BELOW_NORMAL: number;
407
-            const PRIORITY_NORMAL: number;
408
-            const PRIORITY_ABOVE_NORMAL: number;
409
-            const PRIORITY_HIGH: number;
410
-            const PRIORITY_HIGHEST: number;
411
-        }
412
-    }
413
-    const devNull: string;
414
-    /**
415
-     * The operating system-specific end-of-line marker.
416
-     * * `\n` on POSIX
417
-     * * `\r\n` on Windows
418
-     */
419
-    const EOL: string;
420
-    /**
421
-     * Returns the operating system CPU architecture for which the Node.js binary was
422
-     * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
423
-     * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
424
-     *
425
-     * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v25.x/api/process.html#processarch).
426
-     * @since v0.5.0
427
-     */
428
-    function arch(): NodeJS.Architecture;
429
-    /**
430
-     * Returns a string identifying the kernel version.
431
-     *
432
-     * 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
433
-     * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
434
-     * @since v13.11.0, v12.17.0
435
-     */
436
-    function version(): string;
437
-    /**
438
-     * Returns a string identifying the operating system platform for which
439
-     * the Node.js binary was compiled. The value is set at compile time.
440
-     * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
441
-     *
442
-     * The return value is equivalent to `process.platform`.
443
-     *
444
-     * The value `'android'` may also be returned if Node.js is built on the Android
445
-     * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
446
-     * @since v0.5.0
447
-     */
448
-    function platform(): NodeJS.Platform;
449
-    /**
450
-     * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
451
-     * `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.
452
-     *
453
-     * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
454
-     * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
455
-     * @since v18.9.0, v16.18.0
456
-     */
457
-    function machine(): string;
458
-    /**
459
-     * Returns the operating system's default directory for temporary files as a
460
-     * string.
461
-     * @since v0.9.9
462
-     */
463
-    function tmpdir(): string;
464
-    /**
465
-     * Returns a string identifying the endianness of the CPU for which the Node.js
466
-     * binary was compiled.
467
-     *
468
-     * Possible values are `'BE'` for big endian and `'LE'` for little endian.
469
-     * @since v0.9.4
470
-     */
471
-    function endianness(): "BE" | "LE";
472
-    /**
473
-     * Returns the scheduling priority for the process specified by `pid`. If `pid` is
474
-     * not provided or is `0`, the priority of the current process is returned.
475
-     * @since v10.10.0
476
-     * @param [pid=0] The process ID to retrieve scheduling priority for.
477
-     */
478
-    function getPriority(pid?: number): number;
479
-    /**
480
-     * 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.
481
-     *
482
-     * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows
483
-     * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range
484
-     * mapping may cause the return value to be slightly different on Windows. To avoid
485
-     * confusion, set `priority` to one of the priority constants.
486
-     *
487
-     * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
488
-     * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`.
489
-     * @since v10.10.0
490
-     * @param [pid=0] The process ID to set scheduling priority for.
491
-     * @param priority The scheduling priority to assign to the process.
492
-     */
493
-    function setPriority(priority: number): void;
494
-    function setPriority(pid: number, priority: number): void;
495
-}
496
-declare module "os" {
497
-    export * from "node:os";
498
-}

+ 0 - 155
test/node_modules/@types/node/package.json

@@ -1,155 +0,0 @@
1
-{
2
-    "name": "@types/node",
3
-    "version": "25.9.2",
4
-    "description": "TypeScript definitions for node",
5
-    "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
-    "license": "MIT",
7
-    "contributors": [
8
-        {
9
-            "name": "Microsoft TypeScript",
10
-            "githubUsername": "Microsoft",
11
-            "url": "https://github.com/Microsoft"
12
-        },
13
-        {
14
-            "name": "Alberto Schiabel",
15
-            "githubUsername": "jkomyno",
16
-            "url": "https://github.com/jkomyno"
17
-        },
18
-        {
19
-            "name": "Andrew Makarov",
20
-            "githubUsername": "r3nya",
21
-            "url": "https://github.com/r3nya"
22
-        },
23
-        {
24
-            "name": "Benjamin Toueg",
25
-            "githubUsername": "btoueg",
26
-            "url": "https://github.com/btoueg"
27
-        },
28
-        {
29
-            "name": "David Junger",
30
-            "githubUsername": "touffy",
31
-            "url": "https://github.com/touffy"
32
-        },
33
-        {
34
-            "name": "Mohsen Azimi",
35
-            "githubUsername": "mohsen1",
36
-            "url": "https://github.com/mohsen1"
37
-        },
38
-        {
39
-            "name": "Nikita Galkin",
40
-            "githubUsername": "galkin",
41
-            "url": "https://github.com/galkin"
42
-        },
43
-        {
44
-            "name": "Sebastian Silbermann",
45
-            "githubUsername": "eps1lon",
46
-            "url": "https://github.com/eps1lon"
47
-        },
48
-        {
49
-            "name": "Wilco Bakker",
50
-            "githubUsername": "WilcoBakker",
51
-            "url": "https://github.com/WilcoBakker"
52
-        },
53
-        {
54
-            "name": "Marcin Kopacz",
55
-            "githubUsername": "chyzwar",
56
-            "url": "https://github.com/chyzwar"
57
-        },
58
-        {
59
-            "name": "Trivikram Kamat",
60
-            "githubUsername": "trivikr",
61
-            "url": "https://github.com/trivikr"
62
-        },
63
-        {
64
-            "name": "Junxiao Shi",
65
-            "githubUsername": "yoursunny",
66
-            "url": "https://github.com/yoursunny"
67
-        },
68
-        {
69
-            "name": "Ilia Baryshnikov",
70
-            "githubUsername": "qwelias",
71
-            "url": "https://github.com/qwelias"
72
-        },
73
-        {
74
-            "name": "ExE Boss",
75
-            "githubUsername": "ExE-Boss",
76
-            "url": "https://github.com/ExE-Boss"
77
-        },
78
-        {
79
-            "name": "Piotr Błażejewicz",
80
-            "githubUsername": "peterblazejewicz",
81
-            "url": "https://github.com/peterblazejewicz"
82
-        },
83
-        {
84
-            "name": "Anna Henningsen",
85
-            "githubUsername": "addaleax",
86
-            "url": "https://github.com/addaleax"
87
-        },
88
-        {
89
-            "name": "Victor Perin",
90
-            "githubUsername": "victorperin",
91
-            "url": "https://github.com/victorperin"
92
-        },
93
-        {
94
-            "name": "NodeJS Contributors",
95
-            "githubUsername": "NodeJS",
96
-            "url": "https://github.com/NodeJS"
97
-        },
98
-        {
99
-            "name": "Linus Unnebäck",
100
-            "githubUsername": "LinusU",
101
-            "url": "https://github.com/LinusU"
102
-        },
103
-        {
104
-            "name": "wafuwafu13",
105
-            "githubUsername": "wafuwafu13",
106
-            "url": "https://github.com/wafuwafu13"
107
-        },
108
-        {
109
-            "name": "Matteo Collina",
110
-            "githubUsername": "mcollina",
111
-            "url": "https://github.com/mcollina"
112
-        },
113
-        {
114
-            "name": "Dmitry Semigradsky",
115
-            "githubUsername": "Semigradsky",
116
-            "url": "https://github.com/Semigradsky"
117
-        },
118
-        {
119
-            "name": "René",
120
-            "githubUsername": "Renegade334",
121
-            "url": "https://github.com/Renegade334"
122
-        },
123
-        {
124
-            "name": "Yagiz Nizipli",
125
-            "githubUsername": "anonrig",
126
-            "url": "https://github.com/anonrig"
127
-        }
128
-    ],
129
-    "main": "",
130
-    "types": "index.d.ts",
131
-    "typesVersions": {
132
-        "<=5.6": {
133
-            "*": [
134
-                "ts5.6/*"
135
-            ]
136
-        },
137
-        "<=5.7": {
138
-            "*": [
139
-                "ts5.7/*"
140
-            ]
141
-        }
142
-    },
143
-    "repository": {
144
-        "type": "git",
145
-        "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
146
-        "directory": "types/node"
147
-    },
148
-    "scripts": {},
149
-    "dependencies": {
150
-        "undici-types": ">=7.24.0 <7.24.7"
151
-    },
152
-    "peerDependencies": {},
153
-    "typesPublisherContentHash": "a4b1508fd78227ea41216c90a2f88a2fa4eeaefffb6c5d6334a18215ad38d681",
154
-    "typeScriptVersion": "5.3"
155
-}

+ 0 - 178
test/node_modules/@types/node/path.d.ts

@@ -1,178 +0,0 @@
1
-declare module "node:path" {
2
-    namespace path {
3
-        /**
4
-         * A parsed path object generated by path.parse() or consumed by path.format().
5
-         */
6
-        interface ParsedPath {
7
-            /**
8
-             * The root of the path such as '/' or 'c:\'
9
-             */
10
-            root: string;
11
-            /**
12
-             * The full directory path such as '/home/user/dir' or 'c:\path\dir'
13
-             */
14
-            dir: string;
15
-            /**
16
-             * The file name including extension (if any) such as 'index.html'
17
-             */
18
-            base: string;
19
-            /**
20
-             * The file extension (if any) such as '.html'
21
-             */
22
-            ext: string;
23
-            /**
24
-             * The file name without extension (if any) such as 'index'
25
-             */
26
-            name: string;
27
-        }
28
-        interface FormatInputPathObject {
29
-            /**
30
-             * The root of the path such as '/' or 'c:\'
31
-             */
32
-            root?: string | undefined;
33
-            /**
34
-             * The full directory path such as '/home/user/dir' or 'c:\path\dir'
35
-             */
36
-            dir?: string | undefined;
37
-            /**
38
-             * The file name including extension (if any) such as 'index.html'
39
-             */
40
-            base?: string | undefined;
41
-            /**
42
-             * The file extension (if any) such as '.html'
43
-             */
44
-            ext?: string | undefined;
45
-            /**
46
-             * The file name without extension (if any) such as 'index'
47
-             */
48
-            name?: string | undefined;
49
-        }
50
-        /**
51
-         * Normalize a string path, reducing '..' and '.' parts.
52
-         * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
53
-         *
54
-         * @param path string path to normalize.
55
-         * @throws {TypeError} if `path` is not a string.
56
-         */
57
-        function normalize(path: string): string;
58
-        /**
59
-         * Join all arguments together and normalize the resulting path.
60
-         *
61
-         * @param paths paths to join.
62
-         * @throws {TypeError} if any of the path segments is not a string.
63
-         */
64
-        function join(...paths: string[]): string;
65
-        /**
66
-         * The right-most parameter is considered {to}. Other parameters are considered an array of {from}.
67
-         *
68
-         * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
69
-         *
70
-         * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
71
-         * until an absolute path is found. If after using all {from} paths still no absolute path is found,
72
-         * the current working directory is used as well. The resulting path is normalized,
73
-         * and trailing slashes are removed unless the path gets resolved to the root directory.
74
-         *
75
-         * @param paths A sequence of paths or path segments.
76
-         * @throws {TypeError} if any of the arguments is not a string.
77
-         */
78
-        function resolve(...paths: string[]): string;
79
-        /**
80
-         * The `path.matchesGlob()` method determines if `path` matches the `pattern`.
81
-         * @param path The path to glob-match against.
82
-         * @param pattern The glob to check the path against.
83
-         * @returns Whether or not the `path` matched the `pattern`.
84
-         * @throws {TypeError} if `path` or `pattern` are not strings.
85
-         * @since v22.5.0
86
-         */
87
-        function matchesGlob(path: string, pattern: string): boolean;
88
-        /**
89
-         * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
90
-         *
91
-         * If the given {path} is a zero-length string, `false` will be returned.
92
-         *
93
-         * @param path path to test.
94
-         * @throws {TypeError} if `path` is not a string.
95
-         */
96
-        function isAbsolute(path: string): boolean;
97
-        /**
98
-         * Solve the relative path from {from} to {to} based on the current working directory.
99
-         * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
100
-         *
101
-         * @throws {TypeError} if either `from` or `to` is not a string.
102
-         */
103
-        function relative(from: string, to: string): string;
104
-        /**
105
-         * Return the directory name of a path. Similar to the Unix dirname command.
106
-         *
107
-         * @param path the path to evaluate.
108
-         * @throws {TypeError} if `path` is not a string.
109
-         */
110
-        function dirname(path: string): string;
111
-        /**
112
-         * Return the last portion of a path. Similar to the Unix basename command.
113
-         * Often used to extract the file name from a fully qualified path.
114
-         *
115
-         * @param path the path to evaluate.
116
-         * @param suffix optionally, an extension to remove from the result.
117
-         * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string.
118
-         */
119
-        function basename(path: string, suffix?: string): string;
120
-        /**
121
-         * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
122
-         * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
123
-         *
124
-         * @param path the path to evaluate.
125
-         * @throws {TypeError} if `path` is not a string.
126
-         */
127
-        function extname(path: string): string;
128
-        /**
129
-         * The platform-specific file separator. '\\' or '/'.
130
-         */
131
-        const sep: "\\" | "/";
132
-        /**
133
-         * The platform-specific file delimiter. ';' or ':'.
134
-         */
135
-        const delimiter: ";" | ":";
136
-        /**
137
-         * Returns an object from a path string - the opposite of format().
138
-         *
139
-         * @param path path to evaluate.
140
-         * @throws {TypeError} if `path` is not a string.
141
-         */
142
-        function parse(path: string): ParsedPath;
143
-        /**
144
-         * Returns a path string from an object - the opposite of parse().
145
-         *
146
-         * @param pathObject path to evaluate.
147
-         */
148
-        function format(pathObject: FormatInputPathObject): string;
149
-        /**
150
-         * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
151
-         * If path is not a string, path will be returned without modifications.
152
-         * This method is meaningful only on Windows system.
153
-         * On POSIX systems, the method is non-operational and always returns path without modifications.
154
-         */
155
-        function toNamespacedPath(path: string): string;
156
-    }
157
-    namespace path {
158
-        export {
159
-            /**
160
-             * The `path.posix` property provides access to POSIX specific implementations of the `path` methods.
161
-             *
162
-             * The API is accessible via `require('node:path').posix` or `require('node:path/posix')`.
163
-             */
164
-            path as posix,
165
-            /**
166
-             * The `path.win32` property provides access to Windows-specific implementations of the `path` methods.
167
-             *
168
-             * The API is accessible via `require('node:path').win32` or `require('node:path/win32')`.
169
-             */
170
-            path as win32,
171
-        };
172
-    }
173
-    export = path;
174
-}
175
-declare module "path" {
176
-    import path = require("node:path");
177
-    export = path;
178
-}

+ 0 - 8
test/node_modules/@types/node/path/posix.d.ts

@@ -1,8 +0,0 @@
1
-declare module "node:path/posix" {
2
-    import path = require("node:path");
3
-    export = path.posix;
4
-}
5
-declare module "path/posix" {
6
-    import path = require("path");
7
-    export = path.posix;
8
-}

+ 0 - 8
test/node_modules/@types/node/path/win32.d.ts

@@ -1,8 +0,0 @@
1
-declare module "node:path/win32" {
2
-    import path = require("node:path");
3
-    export = path.win32;
4
-}
5
-declare module "path/win32" {
6
-    import path = require("path");
7
-    export = path.win32;
8
-}

+ 0 - 612
test/node_modules/@types/node/perf_hooks.d.ts

@@ -1,612 +0,0 @@
1
-declare module "node:perf_hooks" {
2
-    import { InternalEventTargetEventProperties } from "node:events";
3
-    // #region web types
4
-    type EntryType =
5
-        | "dns" // Node.js only
6
-        | "function" // Node.js only
7
-        | "gc" // Node.js only
8
-        | "http2" // Node.js only
9
-        | "http" // Node.js only
10
-        | "mark" // available on the Web
11
-        | "measure" // available on the Web
12
-        | "net" // Node.js only
13
-        | "node" // Node.js only
14
-        | "resource"; // available on the Web
15
-    interface ConnectionTimingInfo {
16
-        domainLookupStartTime: number;
17
-        domainLookupEndTime: number;
18
-        connectionStartTime: number;
19
-        connectionEndTime: number;
20
-        secureConnectionStartTime: number;
21
-        ALPNNegotiatedProtocol: string;
22
-    }
23
-    interface FetchTimingInfo {
24
-        startTime: number;
25
-        redirectStartTime: number;
26
-        redirectEndTime: number;
27
-        postRedirectStartTime: number;
28
-        finalServiceWorkerStartTime: number;
29
-        finalNetworkRequestStartTime: number;
30
-        finalNetworkResponseStartTime: number;
31
-        endTime: number;
32
-        finalConnectionTimingInfo: ConnectionTimingInfo | null;
33
-        encodedBodySize: number;
34
-        decodedBodySize: number;
35
-    }
36
-    type PerformanceEntryList = PerformanceEntry[];
37
-    interface PerformanceMarkOptions {
38
-        detail?: any;
39
-        startTime?: number;
40
-    }
41
-    interface PerformanceMeasureOptions {
42
-        detail?: any;
43
-        duration?: number;
44
-        end?: string | number;
45
-        start?: string | number;
46
-    }
47
-    interface PerformanceObserverCallback {
48
-        (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
49
-    }
50
-    interface PerformanceObserverInit {
51
-        buffered?: boolean;
52
-        entryTypes?: EntryType[];
53
-        type?: EntryType;
54
-    }
55
-    // TODO: remove in next major
56
-    /** @deprecated Use `TimerifyOptions` instead. */
57
-    interface PerformanceTimerifyOptions extends TimerifyOptions {}
58
-    interface PerformanceEventMap {
59
-        "resourcetimingbufferfull": Event;
60
-    }
61
-    interface Performance extends EventTarget, InternalEventTargetEventProperties<PerformanceEventMap> {
62
-        readonly nodeTiming: PerformanceNodeTiming;
63
-        readonly timeOrigin: number;
64
-        clearMarks(markName?: string): void;
65
-        clearMeasures(measureName?: string): void;
66
-        clearResourceTimings(resourceTimingName?: string): void;
67
-        getEntries(): PerformanceEntryList;
68
-        getEntriesByName(name: string, type?: EntryType): PerformanceEntryList;
69
-        getEntriesByType(type: EntryType): PerformanceEntryList;
70
-        mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
71
-        markResourceTiming(
72
-            timingInfo: FetchTimingInfo,
73
-            requestedUrl: string,
74
-            initiatorType: string,
75
-            global: unknown,
76
-            cacheMode: string,
77
-            bodyInfo: unknown,
78
-            responseStatus: number,
79
-            deliveryType?: string,
80
-        ): PerformanceResourceTiming;
81
-        measure(measureName: string, startMark?: string, endMark?: string): PerformanceMeasure;
82
-        measure(measureName: string, options: PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
83
-        now(): number;
84
-        setResourceTimingBufferSize(maxSize: number): void;
85
-        toJSON(): any;
86
-        addEventListener<K extends keyof PerformanceEventMap>(
87
-            type: K,
88
-            listener: (ev: PerformanceEventMap[K]) => void,
89
-            options?: AddEventListenerOptions | boolean,
90
-        ): void;
91
-        addEventListener(
92
-            type: string,
93
-            listener: EventListener | EventListenerObject,
94
-            options?: AddEventListenerOptions | boolean,
95
-        ): void;
96
-        removeEventListener<K extends keyof PerformanceEventMap>(
97
-            type: K,
98
-            listener: (ev: PerformanceEventMap[K]) => void,
99
-            options?: EventListenerOptions | boolean,
100
-        ): void;
101
-        removeEventListener(
102
-            type: string,
103
-            listener: EventListener | EventListenerObject,
104
-            options?: EventListenerOptions | boolean,
105
-        ): void;
106
-        /**
107
-         * This is an alias of `perf_hooks.eventLoopUtilization()`.
108
-         *
109
-         * _This property is an extension by Node.js. It is not available in Web browsers._
110
-         * @since v14.10.0, v12.19.0
111
-         * @param utilization1 The result of a previous call to
112
-         * `eventLoopUtilization()`.
113
-         * @param utilization2 The result of a previous call to
114
-         * `eventLoopUtilization()` prior to `utilization1`.
115
-         */
116
-        eventLoopUtilization(
117
-            utilization1?: EventLoopUtilization,
118
-            utilization2?: EventLoopUtilization,
119
-        ): EventLoopUtilization;
120
-        /**
121
-         * This is an alias of `perf_hooks.timerify()`.
122
-         *
123
-         * _This property is an extension by Node.js. It is not available in Web browsers._
124
-         * @since v8.5.0
125
-         */
126
-        timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
127
-    }
128
-    var Performance: {
129
-        prototype: Performance;
130
-        new(): Performance;
131
-    };
132
-    interface PerformanceEntry {
133
-        readonly duration: number;
134
-        readonly entryType: EntryType;
135
-        readonly name: string;
136
-        readonly startTime: number;
137
-        toJSON(): any;
138
-    }
139
-    var PerformanceEntry: {
140
-        prototype: PerformanceEntry;
141
-        new(): PerformanceEntry;
142
-    };
143
-    interface PerformanceMark extends PerformanceEntry {
144
-        readonly detail: any;
145
-        readonly entryType: "mark";
146
-    }
147
-    var PerformanceMark: {
148
-        prototype: PerformanceMark;
149
-        new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
150
-    };
151
-    interface PerformanceMeasure extends PerformanceEntry {
152
-        readonly detail: any;
153
-        readonly entryType: "measure";
154
-    }
155
-    var PerformanceMeasure: {
156
-        prototype: PerformanceMeasure;
157
-        new(): PerformanceMeasure;
158
-    };
159
-    interface PerformanceObserver {
160
-        disconnect(): void;
161
-        observe(options: PerformanceObserverInit): void;
162
-        takeRecords(): PerformanceEntryList;
163
-    }
164
-    var PerformanceObserver: {
165
-        prototype: PerformanceObserver;
166
-        new(callback: PerformanceObserverCallback): PerformanceObserver;
167
-        readonly supportedEntryTypes: readonly EntryType[];
168
-    };
169
-    interface PerformanceObserverEntryList {
170
-        getEntries(): PerformanceEntryList;
171
-        getEntriesByName(name: string, type?: EntryType): PerformanceEntryList;
172
-        getEntriesByType(type: EntryType): PerformanceEntryList;
173
-    }
174
-    var PerformanceObserverEntryList: {
175
-        prototype: PerformanceObserverEntryList;
176
-        new(): PerformanceObserverEntryList;
177
-    };
178
-    interface PerformanceResourceTiming extends PerformanceEntry {
179
-        readonly connectEnd: number;
180
-        readonly connectStart: number;
181
-        readonly decodedBodySize: number;
182
-        readonly domainLookupEnd: number;
183
-        readonly domainLookupStart: number;
184
-        readonly encodedBodySize: number;
185
-        readonly entryType: "resource";
186
-        readonly fetchStart: number;
187
-        readonly initiatorType: string;
188
-        readonly nextHopProtocol: string;
189
-        readonly redirectEnd: number;
190
-        readonly redirectStart: number;
191
-        readonly requestStart: number;
192
-        readonly responseEnd: number;
193
-        readonly responseStart: number;
194
-        readonly responseStatus: number;
195
-        readonly secureConnectionStart: number;
196
-        readonly transferSize: number;
197
-        readonly workerStart: number;
198
-        toJSON(): any;
199
-    }
200
-    var PerformanceResourceTiming: {
201
-        prototype: PerformanceResourceTiming;
202
-        new(): PerformanceResourceTiming;
203
-    };
204
-    var performance: Performance;
205
-    // #endregion
206
-    /**
207
-     * _This class is an extension by Node.js. It is not available in Web browsers._
208
-     *
209
-     * Provides detailed Node.js timing data.
210
-     *
211
-     * The constructor of this class is not exposed to users directly.
212
-     * @since v19.0.0
213
-     */
214
-    class PerformanceNodeEntry extends PerformanceEntry {
215
-        /**
216
-         * Additional detail specific to the `entryType`.
217
-         * @since v16.0.0
218
-         */
219
-        readonly detail: any;
220
-        readonly entryType: "dns" | "function" | "gc" | "http2" | "http" | "net" | "node";
221
-    }
222
-    interface UVMetrics {
223
-        /**
224
-         * Number of event loop iterations.
225
-         */
226
-        readonly loopCount: number;
227
-        /**
228
-         * Number of events that have been processed by the event handler.
229
-         */
230
-        readonly events: number;
231
-        /**
232
-         * Number of events that were waiting to be processed when the event provider was called.
233
-         */
234
-        readonly eventsWaiting: number;
235
-    }
236
-    /**
237
-     * _This property is an extension by Node.js. It is not available in Web browsers._
238
-     *
239
-     * Provides timing details for Node.js itself. The constructor of this class
240
-     * is not exposed to users.
241
-     * @since v8.5.0
242
-     */
243
-    interface PerformanceNodeTiming extends PerformanceEntry {
244
-        /**
245
-         * The high resolution millisecond timestamp at which the Node.js process
246
-         * completed bootstrapping. If bootstrapping has not yet finished, the property
247
-         * has the value of -1.
248
-         * @since v8.5.0
249
-         */
250
-        readonly bootstrapComplete: number;
251
-        readonly entryType: "node";
252
-        /**
253
-         * The high resolution millisecond timestamp at which the Node.js environment was
254
-         * initialized.
255
-         * @since v8.5.0
256
-         */
257
-        readonly environment: number;
258
-        /**
259
-         * The high resolution millisecond timestamp of the amount of time the event loop
260
-         * has been idle within the event loop's event provider (e.g. `epoll_wait`). This
261
-         * does not take CPU usage into consideration. If the event loop has not yet
262
-         * started (e.g., in the first tick of the main script), the property has the
263
-         * value of 0.
264
-         * @since v14.10.0, v12.19.0
265
-         */
266
-        readonly idleTime: number;
267
-        /**
268
-         * The high resolution millisecond timestamp at which the Node.js event loop
269
-         * exited. If the event loop has not yet exited, the property has the value of -1\.
270
-         * It can only have a value of not -1 in a handler of the `'exit'` event.
271
-         * @since v8.5.0
272
-         */
273
-        readonly loopExit: number;
274
-        /**
275
-         * The high resolution millisecond timestamp at which the Node.js event loop
276
-         * started. If the event loop has not yet started (e.g., in the first tick of the
277
-         * main script), the property has the value of -1.
278
-         * @since v8.5.0
279
-         */
280
-        readonly loopStart: number;
281
-        /**
282
-         * The high resolution millisecond timestamp at which the Node.js process was initialized.
283
-         * @since v8.5.0
284
-         */
285
-        readonly nodeStart: number;
286
-        /**
287
-         * This is a wrapper to the `uv_metrics_info` function.
288
-         * It returns the current set of event loop metrics.
289
-         *
290
-         * It is recommended to use this property inside a function whose execution was
291
-         * scheduled using `setImmediate` to avoid collecting metrics before finishing all
292
-         * operations scheduled during the current loop iteration.
293
-         * @since v22.8.0, v20.18.0
294
-         */
295
-        readonly uvMetricsInfo: UVMetrics;
296
-        /**
297
-         * The high resolution millisecond timestamp at which the V8 platform was
298
-         * initialized.
299
-         * @since v8.5.0
300
-         */
301
-        readonly v8Start: number;
302
-    }
303
-    namespace constants {
304
-        const NODE_PERFORMANCE_GC_MAJOR: number;
305
-        const NODE_PERFORMANCE_GC_MINOR: number;
306
-        const NODE_PERFORMANCE_GC_INCREMENTAL: number;
307
-        const NODE_PERFORMANCE_GC_WEAKCB: number;
308
-        const NODE_PERFORMANCE_GC_FLAGS_NO: number;
309
-        const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
310
-        const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
311
-        const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
312
-        const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
313
-        const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
314
-        const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
315
-    }
316
-    interface EventLoopMonitorOptions {
317
-        /**
318
-         * The sampling rate in milliseconds.
319
-         * Must be greater than zero.
320
-         * @default 10
321
-         */
322
-        resolution?: number | undefined;
323
-    }
324
-    interface Histogram {
325
-        /**
326
-         * The number of samples recorded by the histogram.
327
-         * @since v17.4.0, v16.14.0
328
-         */
329
-        readonly count: number;
330
-        /**
331
-         * The number of samples recorded by the histogram.
332
-         * v17.4.0, v16.14.0
333
-         */
334
-        readonly countBigInt: bigint;
335
-        /**
336
-         * The number of times the event loop delay exceeded the maximum 1 hour event
337
-         * loop delay threshold.
338
-         * @since v11.10.0
339
-         */
340
-        readonly exceeds: number;
341
-        /**
342
-         * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
343
-         * @since v17.4.0, v16.14.0
344
-         */
345
-        readonly exceedsBigInt: bigint;
346
-        /**
347
-         * The maximum recorded event loop delay.
348
-         * @since v11.10.0
349
-         */
350
-        readonly max: number;
351
-        /**
352
-         * The maximum recorded event loop delay.
353
-         * v17.4.0, v16.14.0
354
-         */
355
-        readonly maxBigInt: number;
356
-        /**
357
-         * The mean of the recorded event loop delays.
358
-         * @since v11.10.0
359
-         */
360
-        readonly mean: number;
361
-        /**
362
-         * The minimum recorded event loop delay.
363
-         * @since v11.10.0
364
-         */
365
-        readonly min: number;
366
-        /**
367
-         * The minimum recorded event loop delay.
368
-         * v17.4.0, v16.14.0
369
-         */
370
-        readonly minBigInt: bigint;
371
-        /**
372
-         * Returns the value at the given percentile.
373
-         * @since v11.10.0
374
-         * @param percentile A percentile value in the range (0, 100].
375
-         */
376
-        percentile(percentile: number): number;
377
-        /**
378
-         * Returns the value at the given percentile.
379
-         * @since v17.4.0, v16.14.0
380
-         * @param percentile A percentile value in the range (0, 100].
381
-         */
382
-        percentileBigInt(percentile: number): bigint;
383
-        /**
384
-         * Returns a `Map` object detailing the accumulated percentile distribution.
385
-         * @since v11.10.0
386
-         */
387
-        readonly percentiles: Map<number, number>;
388
-        /**
389
-         * Returns a `Map` object detailing the accumulated percentile distribution.
390
-         * @since v17.4.0, v16.14.0
391
-         */
392
-        readonly percentilesBigInt: Map<bigint, bigint>;
393
-        /**
394
-         * Resets the collected histogram data.
395
-         * @since v11.10.0
396
-         */
397
-        reset(): void;
398
-        /**
399
-         * The standard deviation of the recorded event loop delays.
400
-         * @since v11.10.0
401
-         */
402
-        readonly stddev: number;
403
-    }
404
-    interface IntervalHistogram extends Histogram {
405
-        /**
406
-         * Enables the update interval timer. Returns `true` if the timer was
407
-         * started, `false` if it was already started.
408
-         * @since v11.10.0
409
-         */
410
-        enable(): boolean;
411
-        /**
412
-         * Disables the update interval timer. Returns `true` if the timer was
413
-         * stopped, `false` if it was already stopped.
414
-         * @since v11.10.0
415
-         */
416
-        disable(): boolean;
417
-        /**
418
-         * Disables the update interval timer when the histogram is disposed.
419
-         *
420
-         * ```js
421
-         * const { monitorEventLoopDelay } = require('node:perf_hooks');
422
-         * {
423
-         *   using hist = monitorEventLoopDelay({ resolution: 20 });
424
-         *   hist.enable();
425
-         *   // The histogram will be disabled when the block is exited.
426
-         * }
427
-         * ```
428
-         * @since v24.2.0
429
-         */
430
-        [Symbol.dispose](): void;
431
-    }
432
-    interface RecordableHistogram extends Histogram {
433
-        /**
434
-         * @since v15.9.0, v14.18.0
435
-         * @param val The amount to record in the histogram.
436
-         */
437
-        record(val: number | bigint): void;
438
-        /**
439
-         * Calculates the amount of time (in nanoseconds) that has passed since the
440
-         * previous call to `recordDelta()` and records that amount in the histogram.
441
-         * @since v15.9.0, v14.18.0
442
-         */
443
-        recordDelta(): void;
444
-        /**
445
-         * Adds the values from `other` to this histogram.
446
-         * @since v17.4.0, v16.14.0
447
-         */
448
-        add(other: RecordableHistogram): void;
449
-    }
450
-    interface EventLoopUtilization {
451
-        idle: number;
452
-        active: number;
453
-        utilization: number;
454
-    }
455
-    /**
456
-     * The `eventLoopUtilization()` function returns an object that contains the
457
-     * cumulative duration of time the event loop has been both idle and active as a
458
-     * high resolution milliseconds timer. The `utilization` value is the calculated
459
-     * Event Loop Utilization (ELU).
460
-     *
461
-     * If bootstrapping has not yet finished on the main thread the properties have
462
-     * the value of `0`. The ELU is immediately available on [Worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#worker-threads) since
463
-     * bootstrap happens within the event loop.
464
-     *
465
-     * Both `utilization1` and `utilization2` are optional parameters.
466
-     *
467
-     * If `utilization1` is passed, then the delta between the current call's `active`
468
-     * and `idle` times, as well as the corresponding `utilization` value are
469
-     * calculated and returned (similar to `process.hrtime()`).
470
-     *
471
-     * If `utilization1` and `utilization2` are both passed, then the delta is
472
-     * calculated between the two arguments. This is a convenience option because,
473
-     * unlike `process.hrtime()`, calculating the ELU is more complex than a
474
-     * single subtraction.
475
-     *
476
-     * ELU is similar to CPU utilization, except that it only measures event loop
477
-     * statistics and not CPU usage. It represents the percentage of time the event
478
-     * loop has spent outside the event loop's event provider (e.g. `epoll_wait`).
479
-     * No other CPU idle time is taken into consideration. The following is an example
480
-     * of how a mostly idle process will have a high ELU.
481
-     *
482
-     * ```js
483
-     * import { eventLoopUtilization } from 'node:perf_hooks';
484
-     * import { spawnSync } from 'node:child_process';
485
-     *
486
-     * setImmediate(() => {
487
-     *   const elu = eventLoopUtilization();
488
-     *   spawnSync('sleep', ['5']);
489
-     *   console.log(eventLoopUtilization(elu).utilization);
490
-     * });
491
-     * ```
492
-     *
493
-     * Although the CPU is mostly idle while running this script, the value of
494
-     * `utilization` is `1`. This is because the call to
495
-     * `child_process.spawnSync()` blocks the event loop from proceeding.
496
-     *
497
-     * Passing in a user-defined object instead of the result of a previous call to
498
-     * `eventLoopUtilization()` will lead to undefined behavior. The return values
499
-     * are not guaranteed to reflect any correct state of the event loop.
500
-     * @since v25.2.0
501
-     * @param utilization1 The result of a previous call to
502
-     * `eventLoopUtilization()`.
503
-     * @param utilization2 The result of a previous call to
504
-     * `eventLoopUtilization()` prior to `utilization1`.
505
-     */
506
-    function eventLoopUtilization(
507
-        utilization1?: EventLoopUtilization,
508
-        utilization2?: EventLoopUtilization,
509
-    ): EventLoopUtilization;
510
-    /**
511
-     * _This property is an extension by Node.js. It is not available in Web browsers._
512
-     *
513
-     * Creates an `IntervalHistogram` object that samples and reports the event loop
514
-     * delay over time. The delays will be reported in nanoseconds.
515
-     *
516
-     * Using a timer to detect approximate event loop delay works because the
517
-     * execution of timers is tied specifically to the lifecycle of the libuv
518
-     * event loop. That is, a delay in the loop will cause a delay in the execution
519
-     * of the timer, and those delays are specifically what this API is intended to
520
-     * detect.
521
-     *
522
-     * ```js
523
-     * import { monitorEventLoopDelay } from 'node:perf_hooks';
524
-     * const h = monitorEventLoopDelay({ resolution: 20 });
525
-     * h.enable();
526
-     * // Do something.
527
-     * h.disable();
528
-     * console.log(h.min);
529
-     * console.log(h.max);
530
-     * console.log(h.mean);
531
-     * console.log(h.stddev);
532
-     * console.log(h.percentiles);
533
-     * console.log(h.percentile(50));
534
-     * console.log(h.percentile(99));
535
-     * ```
536
-     * @since v11.10.0
537
-     */
538
-    function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram;
539
-    interface TimerifyOptions {
540
-        /**
541
-         * A histogram object created using
542
-         * `perf_hooks.createHistogram()` that will record runtime durations in
543
-         * nanoseconds.
544
-         */
545
-        histogram?: RecordableHistogram | undefined;
546
-    }
547
-    /**
548
-     * _This property is an extension by Node.js. It is not available in Web browsers._
549
-     *
550
-     * Wraps a function within a new function that measures the running time of the
551
-     * wrapped function. A `PerformanceObserver` must be subscribed to the `'function'`
552
-     * event type in order for the timing details to be accessed.
553
-     *
554
-     * ```js
555
-     * import { timerify, performance, PerformanceObserver } from 'node:perf_hooks';
556
-     *
557
-     * function someFunction() {
558
-     *   console.log('hello world');
559
-     * }
560
-     *
561
-     * const wrapped = timerify(someFunction);
562
-     *
563
-     * const obs = new PerformanceObserver((list) => {
564
-     *   console.log(list.getEntries()[0].duration);
565
-     *
566
-     *   performance.clearMarks();
567
-     *   performance.clearMeasures();
568
-     *   obs.disconnect();
569
-     * });
570
-     * obs.observe({ entryTypes: ['function'] });
571
-     *
572
-     * // A performance timeline entry will be created
573
-     * wrapped();
574
-     * ```
575
-     *
576
-     * If the wrapped function returns a promise, a finally handler will be attached
577
-     * to the promise and the duration will be reported once the finally handler is
578
-     * invoked.
579
-     * @since v25.2.0
580
-     */
581
-    function timerify<T extends (...args: any[]) => any>(fn: T, options?: TimerifyOptions): T;
582
-    interface CreateHistogramOptions {
583
-        /**
584
-         * The minimum recordable value. Must be an integer value greater than 0.
585
-         * @default 1
586
-         */
587
-        lowest?: number | bigint | undefined;
588
-        /**
589
-         * The maximum recordable value. Must be an integer value greater than min.
590
-         * @default Number.MAX_SAFE_INTEGER
591
-         */
592
-        highest?: number | bigint | undefined;
593
-        /**
594
-         * The number of accuracy digits. Must be a number between 1 and 5.
595
-         * @default 3
596
-         */
597
-        figures?: number | undefined;
598
-    }
599
-    /**
600
-     * Returns a `RecordableHistogram`.
601
-     * @since v15.9.0, v14.18.0
602
-     */
603
-    function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
604
-    // TODO: remove these in a future major
605
-    /** @deprecated Use the canonical `PerformanceMarkOptions` instead. */
606
-    interface MarkOptions extends PerformanceMarkOptions {}
607
-    /** @deprecated Use the canonical `PerformanceMeasureOptions` instead. */
608
-    interface MeasureOptions extends PerformanceMeasureOptions {}
609
-}
610
-declare module "perf_hooks" {
611
-    export * from "node:perf_hooks";
612
-}

Разлика између датотеке није приказан због своје велике величине
+ 0 - 2204
test/node_modules/@types/node/process.d.ts


+ 0 - 89
test/node_modules/@types/node/punycode.d.ts

@@ -1,89 +0,0 @@
1
-declare module "node:punycode" {
2
-    /**
3
-     * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only
4
-     * characters to the equivalent string of Unicode codepoints.
5
-     *
6
-     * ```js
7
-     * punycode.decode('maana-pta'); // 'mañana'
8
-     * punycode.decode('--dqo34k'); // '☃-⌘'
9
-     * ```
10
-     * @since v0.5.1
11
-     */
12
-    function decode(string: string): string;
13
-    /**
14
-     * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
15
-     *
16
-     * ```js
17
-     * punycode.encode('mañana'); // 'maana-pta'
18
-     * punycode.encode('☃-⌘'); // '--dqo34k'
19
-     * ```
20
-     * @since v0.5.1
21
-     */
22
-    function encode(string: string): string;
23
-    /**
24
-     * The `punycode.toUnicode()` method converts a string representing a domain name
25
-     * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
26
-     * converted.
27
-     *
28
-     * ```js
29
-     * // decode domain names
30
-     * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
31
-     * punycode.toUnicode('xn----dqo34k.com');  // '☃-⌘.com'
32
-     * punycode.toUnicode('example.com');       // 'example.com'
33
-     * ```
34
-     * @since v0.6.1
35
-     */
36
-    function toUnicode(domain: string): string;
37
-    /**
38
-     * The `punycode.toASCII()` method converts a Unicode string representing an
39
-     * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the
40
-     * domain name will be converted. Calling `punycode.toASCII()` on a string that
41
-     * already only contains ASCII characters will have no effect.
42
-     *
43
-     * ```js
44
-     * // encode domain names
45
-     * punycode.toASCII('mañana.com');  // 'xn--maana-pta.com'
46
-     * punycode.toASCII('☃-⌘.com');   // 'xn----dqo34k.com'
47
-     * punycode.toASCII('example.com'); // 'example.com'
48
-     * ```
49
-     * @since v0.6.1
50
-     */
51
-    function toASCII(domain: string): string;
52
-    /**
53
-     * @deprecated since v7.0.0
54
-     * The version of the punycode module bundled in Node.js is being deprecated.
55
-     * In a future major version of Node.js this module will be removed.
56
-     * Users currently depending on the punycode module should switch to using
57
-     * the userland-provided Punycode.js module instead.
58
-     */
59
-    const ucs2: ucs2;
60
-    interface ucs2 {
61
-        /**
62
-         * @deprecated since v7.0.0
63
-         * The version of the punycode module bundled in Node.js is being deprecated.
64
-         * In a future major version of Node.js this module will be removed.
65
-         * Users currently depending on the punycode module should switch to using
66
-         * the userland-provided Punycode.js module instead.
67
-         */
68
-        decode(string: string): number[];
69
-        /**
70
-         * @deprecated since v7.0.0
71
-         * The version of the punycode module bundled in Node.js is being deprecated.
72
-         * In a future major version of Node.js this module will be removed.
73
-         * Users currently depending on the punycode module should switch to using
74
-         * the userland-provided Punycode.js module instead.
75
-         */
76
-        encode(codePoints: readonly number[]): string;
77
-    }
78
-    /**
79
-     * @deprecated since v7.0.0
80
-     * The version of the punycode module bundled in Node.js is being deprecated.
81
-     * In a future major version of Node.js this module will be removed.
82
-     * Users currently depending on the punycode module should switch to using
83
-     * the userland-provided Punycode.js module instead.
84
-     */
85
-    const version: string;
86
-}
87
-declare module "punycode" {
88
-    export * from "node:punycode";
89
-}

+ 0 - 139
test/node_modules/@types/node/querystring.d.ts

@@ -1,139 +0,0 @@
1
-declare module "node:querystring" {
2
-    interface StringifyOptions {
3
-        /**
4
-         * The function to use when converting URL-unsafe characters to percent-encoding in the query string.
5
-         * @default `querystring.escape()`
6
-         */
7
-        encodeURIComponent?: ((str: string) => string) | undefined;
8
-    }
9
-    interface ParseOptions {
10
-        /**
11
-         * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations.
12
-         * @default 1000
13
-         */
14
-        maxKeys?: number | undefined;
15
-        /**
16
-         * The function to use when decoding percent-encoded characters in the query string.
17
-         * @default `querystring.unescape()`
18
-         */
19
-        decodeURIComponent?: ((str: string) => string) | undefined;
20
-    }
21
-    interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
22
-    interface ParsedUrlQueryInput extends
23
-        NodeJS.Dict<
24
-            | string
25
-            | number
26
-            | boolean
27
-            | bigint
28
-            | ReadonlyArray<string | number | boolean | bigint>
29
-            | null
30
-        >
31
-    {}
32
-    /**
33
-     * The `querystring.stringify()` method produces a URL query string from a
34
-     * given `obj` by iterating through the object's "own properties".
35
-     *
36
-     * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
37
-     * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
38
-     * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
39
-     * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
40
-     * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
41
-     * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
42
-     * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
43
-     * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
44
-     * empty strings.
45
-     *
46
-     * ```js
47
-     * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
48
-     * // Returns 'foo=bar&#x26;baz=qux&#x26;baz=quux&#x26;corge='
49
-     *
50
-     * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
51
-     * // Returns 'foo:bar;baz:qux'
52
-     * ```
53
-     *
54
-     * By default, characters requiring percent-encoding within the query string will
55
-     * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified:
56
-     *
57
-     * ```js
58
-     * // Assuming gbkEncodeURIComponent function already exists,
59
-     *
60
-     * querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
61
-     *                       { encodeURIComponent: gbkEncodeURIComponent });
62
-     * ```
63
-     * @since v0.1.25
64
-     * @param obj The object to serialize into a URL query string
65
-     * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
66
-     * @param [eq='='] . The substring used to delimit keys and values in the query string.
67
-     */
68
-    function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
69
-    /**
70
-     * The `querystring.parse()` method parses a URL query string (`str`) into a
71
-     * collection of key and value pairs.
72
-     *
73
-     * For example, the query string `'foo=bar&#x26;abc=xyz&#x26;abc=123'` is parsed into:
74
-     *
75
-     * ```json
76
-     * {
77
-     *   "foo": "bar",
78
-     *   "abc": ["xyz", "123"]
79
-     * }
80
-     * ```
81
-     *
82
-     * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`,
83
-     * `obj.hasOwnProperty()`, and others
84
-     * are not defined and _will not work_.
85
-     *
86
-     * By default, percent-encoded characters within the query string will be assumed
87
-     * to use UTF-8 encoding. If an alternative character encoding is used, then an
88
-     * alternative `decodeURIComponent` option will need to be specified:
89
-     *
90
-     * ```js
91
-     * // Assuming gbkDecodeURIComponent function already exists...
92
-     *
93
-     * querystring.parse('w=%D6%D0%CE%C4&#x26;foo=bar', null, null,
94
-     *                   { decodeURIComponent: gbkDecodeURIComponent });
95
-     * ```
96
-     * @since v0.1.25
97
-     * @param str The URL query string to parse
98
-     * @param [sep='&'] The substring used to delimit key and value pairs in the query string.
99
-     * @param [eq='='] The substring used to delimit keys and values in the query string.
100
-     */
101
-    function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
102
-    /**
103
-     * The querystring.encode() function is an alias for querystring.stringify().
104
-     */
105
-    const encode: typeof stringify;
106
-    /**
107
-     * The querystring.decode() function is an alias for querystring.parse().
108
-     */
109
-    const decode: typeof parse;
110
-    /**
111
-     * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL
112
-     * query strings.
113
-     *
114
-     * The `querystring.escape()` method is used by `querystring.stringify()` and is
115
-     * generally not expected to be used directly. It is exported primarily to allow
116
-     * application code to provide a replacement percent-encoding implementation if
117
-     * necessary by assigning `querystring.escape` to an alternative function.
118
-     * @since v0.1.25
119
-     */
120
-    function escape(str: string): string;
121
-    /**
122
-     * The `querystring.unescape()` method performs decoding of URL percent-encoded
123
-     * characters on the given `str`.
124
-     *
125
-     * The `querystring.unescape()` method is used by `querystring.parse()` and is
126
-     * generally not expected to be used directly. It is exported primarily to allow
127
-     * application code to provide a replacement decoding implementation if
128
-     * necessary by assigning `querystring.unescape` to an alternative function.
129
-     *
130
-     * By default, the `querystring.unescape()` method will attempt to use the
131
-     * JavaScript built-in `decodeURIComponent()` method to decode. If that fails,
132
-     * a safer equivalent that does not throw on malformed URLs will be used.
133
-     * @since v0.1.25
134
-     */
135
-    function unescape(str: string): string;
136
-}
137
-declare module "querystring" {
138
-    export * from "node:querystring";
139
-}

+ 0 - 897
test/node_modules/@types/node/quic.d.ts

@@ -1,897 +0,0 @@
1
-declare module "node:quic" {
2
-    import { KeyObject, webcrypto } from "node:crypto";
3
-    import { SocketAddress } from "node:net";
4
-    import { ReadableStream } from "node:stream/web";
5
-    /**
6
-     * @since v23.8.0
7
-     */
8
-    type OnSessionCallback = (this: QuicEndpoint, session: QuicSession) => void;
9
-    /**
10
-     * @since v23.8.0
11
-     */
12
-    type OnStreamCallback = (this: QuicSession, stream: QuicStream) => void;
13
-    /**
14
-     * @since v23.8.0
15
-     */
16
-    type OnDatagramCallback = (this: QuicSession, datagram: Uint8Array, early: boolean) => void;
17
-    /**
18
-     * @since v23.8.0
19
-     */
20
-    type OnDatagramStatusCallback = (this: QuicSession, id: bigint, status: "lost" | "acknowledged") => void;
21
-    /**
22
-     * @since v23.8.0
23
-     */
24
-    type OnPathValidationCallback = (
25
-        this: QuicSession,
26
-        result: "success" | "failure" | "aborted",
27
-        newLocalAddress: SocketAddress,
28
-        newRemoteAddress: SocketAddress,
29
-        oldLocalAddress: SocketAddress,
30
-        oldRemoteAddress: SocketAddress,
31
-        preferredAddress: boolean,
32
-    ) => void;
33
-    /**
34
-     * @since v23.8.0
35
-     */
36
-    type OnSessionTicketCallback = (this: QuicSession, ticket: object) => void;
37
-    /**
38
-     * @since v23.8.0
39
-     */
40
-    type OnVersionNegotiationCallback = (
41
-        this: QuicSession,
42
-        version: number,
43
-        requestedVersions: number[],
44
-        supportedVersions: number[],
45
-    ) => void;
46
-    /**
47
-     * @since v23.8.0
48
-     */
49
-    type OnHandshakeCallback = (
50
-        this: QuicSession,
51
-        sni: string,
52
-        alpn: string,
53
-        cipher: string,
54
-        cipherVersion: string,
55
-        validationErrorReason: string,
56
-        validationErrorCode: number,
57
-        earlyDataAccepted: boolean,
58
-    ) => void;
59
-    /**
60
-     * @since v23.8.0
61
-     */
62
-    type OnBlockedCallback = (this: QuicStream) => void;
63
-    /**
64
-     * @since v23.8.0
65
-     */
66
-    type OnStreamErrorCallback = (this: QuicStream, error: any) => void;
67
-    /**
68
-     * @since v23.8.0
69
-     */
70
-    interface TransportParams {
71
-        /**
72
-         * The preferred IPv4 address to advertise.
73
-         * @since v23.8.0
74
-         */
75
-        preferredAddressIpv4?: SocketAddress | undefined;
76
-        /**
77
-         * The preferred IPv6 address to advertise.
78
-         * @since v23.8.0
79
-         */
80
-        preferredAddressIpv6?: SocketAddress | undefined;
81
-        /**
82
-         * @since v23.8.0
83
-         */
84
-        initialMaxStreamDataBidiLocal?: bigint | number | undefined;
85
-        /**
86
-         * @since v23.8.0
87
-         */
88
-        initialMaxStreamDataBidiRemote?: bigint | number | undefined;
89
-        /**
90
-         * @since v23.8.0
91
-         */
92
-        initialMaxStreamDataUni?: bigint | number | undefined;
93
-        /**
94
-         * @since v23.8.0
95
-         */
96
-        initialMaxData?: bigint | number | undefined;
97
-        /**
98
-         * @since v23.8.0
99
-         */
100
-        initialMaxStreamsBidi?: bigint | number | undefined;
101
-        /**
102
-         * @since v23.8.0
103
-         */
104
-        initialMaxStreamsUni?: bigint | number | undefined;
105
-        /**
106
-         * @since v23.8.0
107
-         */
108
-        maxIdleTimeout?: bigint | number | undefined;
109
-        /**
110
-         * @since v23.8.0
111
-         */
112
-        activeConnectionIDLimit?: bigint | number | undefined;
113
-        /**
114
-         * @since v23.8.0
115
-         */
116
-        ackDelayExponent?: bigint | number | undefined;
117
-        /**
118
-         * @since v23.8.0
119
-         */
120
-        maxAckDelay?: bigint | number | undefined;
121
-        /**
122
-         * @since v23.8.0
123
-         */
124
-        maxDatagramFrameSize?: bigint | number | undefined;
125
-    }
126
-    /**
127
-     * @since v23.8.0
128
-     */
129
-    interface SessionOptions {
130
-        /**
131
-         * An endpoint to use.
132
-         * @since v23.8.0
133
-         */
134
-        endpoint?: EndpointOptions | QuicEndpoint | undefined;
135
-        /**
136
-         * The ALPN protocol identifier.
137
-         * @since v23.8.0
138
-         */
139
-        alpn?: string | undefined;
140
-        /**
141
-         * The CA certificates to use for sessions.
142
-         * @since v23.8.0
143
-         */
144
-        ca?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
145
-        /**
146
-         * Specifies the congestion control algorithm that will be used.
147
-         * Must be set to one of either `'reno'`, `'cubic'`, or `'bbr'`.
148
-         *
149
-         * This is an advanced option that users typically won't have need to specify.
150
-         * @since v23.8.0
151
-         */
152
-        cc?: `${constants.cc}` | undefined;
153
-        /**
154
-         * The TLS certificates to use for sessions.
155
-         * @since v23.8.0
156
-         */
157
-        certs?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
158
-        /**
159
-         * The list of supported TLS 1.3 cipher algorithms.
160
-         * @since v23.8.0
161
-         */
162
-        ciphers?: string | undefined;
163
-        /**
164
-         * The CRL to use for sessions.
165
-         * @since v23.8.0
166
-         */
167
-        crl?: ArrayBuffer | NodeJS.ArrayBufferView | ReadonlyArray<ArrayBuffer | NodeJS.ArrayBufferView> | undefined;
168
-        /**
169
-         * The list of support TLS 1.3 cipher groups.
170
-         * @since v23.8.0
171
-         */
172
-        groups?: string | undefined;
173
-        /**
174
-         * True to enable TLS keylogging output.
175
-         * @since v23.8.0
176
-         */
177
-        keylog?: boolean | undefined;
178
-        /**
179
-         * The TLS crypto keys to use for sessions.
180
-         * @since v23.8.0
181
-         */
182
-        keys?: KeyObject | readonly KeyObject[] | undefined;
183
-        /**
184
-         * Specifies the maximum UDP packet payload size.
185
-         * @since v23.8.0
186
-         */
187
-        maxPayloadSize?: bigint | number | undefined;
188
-        /**
189
-         * Specifies the maximum stream flow-control window size.
190
-         * @since v23.8.0
191
-         */
192
-        maxStreamWindow?: bigint | number | undefined;
193
-        /**
194
-         * Specifies the maximum session flow-control window size.
195
-         * @since v23.8.0
196
-         */
197
-        maxWindow?: bigint | number | undefined;
198
-        /**
199
-         * The minimum QUIC version number to allow. This is an advanced option that users
200
-         * typically won't have need to specify.
201
-         * @since v23.8.0
202
-         */
203
-        minVersion?: number | undefined;
204
-        /**
205
-         * When the remote peer advertises a preferred address, this option specifies whether
206
-         * to use it or ignore it.
207
-         * @since v23.8.0
208
-         */
209
-        preferredAddressPolicy?: "use" | "ignore" | "default" | undefined;
210
-        /**
211
-         * True if qlog output should be enabled.
212
-         * @since v23.8.0
213
-         */
214
-        qlog?: boolean | undefined;
215
-        /**
216
-         * A session ticket to use for 0RTT session resumption.
217
-         * @since v23.8.0
218
-         */
219
-        sessionTicket?: NodeJS.ArrayBufferView | undefined;
220
-        /**
221
-         * Specifies the maximum number of milliseconds a TLS handshake is permitted to take
222
-         * to complete before timing out.
223
-         * @since v23.8.0
224
-         */
225
-        handshakeTimeout?: bigint | number | undefined;
226
-        /**
227
-         * The peer server name to target.
228
-         * @since v23.8.0
229
-         */
230
-        sni?: string | undefined;
231
-        /**
232
-         * True to enable TLS tracing output.
233
-         * @since v23.8.0
234
-         */
235
-        tlsTrace?: boolean | undefined;
236
-        /**
237
-         * The QUIC transport parameters to use for the session.
238
-         * @since v23.8.0
239
-         */
240
-        transportParams?: TransportParams | undefined;
241
-        /**
242
-         * Specifies the maximum number of unacknowledged packets a session should allow.
243
-         * @since v23.8.0
244
-         */
245
-        unacknowledgedPacketThreshold?: bigint | number | undefined;
246
-        /**
247
-         * True to require verification of TLS client certificate.
248
-         * @since v23.8.0
249
-         */
250
-        verifyClient?: boolean | undefined;
251
-        /**
252
-         * True to require private key verification.
253
-         * @since v23.8.0
254
-         */
255
-        verifyPrivateKey?: boolean | undefined;
256
-        /**
257
-         * The QUIC version number to use. This is an advanced option that users typically
258
-         * won't have need to specify.
259
-         * @since v23.8.0
260
-         */
261
-        version?: number | undefined;
262
-    }
263
-    /**
264
-     * Initiate a new client-side session.
265
-     *
266
-     * ```js
267
-     * import { connect } from 'node:quic';
268
-     * import { Buffer } from 'node:buffer';
269
-     *
270
-     * const enc = new TextEncoder();
271
-     * const alpn = 'foo';
272
-     * const client = await connect('123.123.123.123:8888', { alpn });
273
-     * await client.createUnidirectionalStream({
274
-     *   body: enc.encode('hello world'),
275
-     * });
276
-     * ```
277
-     *
278
-     * By default, every call to `connect(...)` will create a new local
279
-     * `QuicEndpoint` instance bound to a new random local IP port. To
280
-     * specify the exact local address to use, or to multiplex multiple
281
-     * QUIC sessions over a single local port, pass the `endpoint` option
282
-     * with either a `QuicEndpoint` or `EndpointOptions` as the argument.
283
-     *
284
-     * ```js
285
-     * import { QuicEndpoint, connect } from 'node:quic';
286
-     *
287
-     * const endpoint = new QuicEndpoint({
288
-     *   address: '127.0.0.1:1234',
289
-     * });
290
-     *
291
-     * const client = await connect('123.123.123.123:8888', { endpoint });
292
-     * ```
293
-     * @since v23.8.0
294
-     */
295
-    function connect(address: string | SocketAddress, options?: SessionOptions): Promise<QuicSession>;
296
-    /**
297
-     * Configures the endpoint to listen as a server. When a new session is initiated by
298
-     * a remote peer, the given `onsession` callback will be invoked with the created
299
-     * session.
300
-     *
301
-     * ```js
302
-     * import { listen } from 'node:quic';
303
-     *
304
-     * const endpoint = await listen((session) => {
305
-     *   // ... handle the session
306
-     * });
307
-     *
308
-     * // Closing the endpoint allows any sessions open when close is called
309
-     * // to complete naturally while preventing new sessions from being
310
-     * // initiated. Once all existing sessions have finished, the endpoint
311
-     * // will be destroyed. The call returns a promise that is resolved once
312
-     * // the endpoint is destroyed.
313
-     * await endpoint.close();
314
-     * ```
315
-     *
316
-     * By default, every call to `listen(...)` will create a new local
317
-     * `QuicEndpoint` instance bound to a new random local IP port. To
318
-     * specify the exact local address to use, or to multiplex multiple
319
-     * QUIC sessions over a single local port, pass the `endpoint` option
320
-     * with either a `QuicEndpoint` or `EndpointOptions` as the argument.
321
-     *
322
-     * At most, any single `QuicEndpoint` can only be configured to listen as
323
-     * a server once.
324
-     * @since v23.8.0
325
-     */
326
-    function listen(onsession: OnSessionCallback, options?: SessionOptions): Promise<QuicEndpoint>;
327
-    /**
328
-     * The endpoint configuration options passed when constructing a new `QuicEndpoint` instance.
329
-     * @since v23.8.0
330
-     */
331
-    interface EndpointOptions {
332
-        /**
333
-         * If not specified the endpoint will bind to IPv4 `localhost` on a random port.
334
-         * @since v23.8.0
335
-         */
336
-        address?: SocketAddress | string | undefined;
337
-        /**
338
-         * The endpoint maintains an internal cache of validated socket addresses as a
339
-         * performance optimization. This option sets the maximum number of addresses
340
-         * that are cache. This is an advanced option that users typically won't have
341
-         * need to specify.
342
-         * @since v23.8.0
343
-         */
344
-        addressLRUSize?: bigint | number | undefined;
345
-        /**
346
-         * When `true`, indicates that the endpoint should bind only to IPv6 addresses.
347
-         * @since v23.8.0
348
-         */
349
-        ipv6Only?: boolean | undefined;
350
-        /**
351
-         * Specifies the maximum number of concurrent sessions allowed per remote peer address.
352
-         * @since v23.8.0
353
-         */
354
-        maxConnectionsPerHost?: bigint | number | undefined;
355
-        /**
356
-         * Specifies the maximum total number of concurrent sessions.
357
-         * @since v23.8.0
358
-         */
359
-        maxConnectionsTotal?: bigint | number | undefined;
360
-        /**
361
-         * Specifies the maximum number of QUIC retry attempts allowed per remote peer address.
362
-         * @since v23.8.0
363
-         */
364
-        maxRetries?: bigint | number | undefined;
365
-        /**
366
-         * Specifies the maximum number of stateless resets that are allowed per remote peer address.
367
-         * @since v23.8.0
368
-         */
369
-        maxStatelessResetsPerHost?: bigint | number | undefined;
370
-        /**
371
-         * Specifies the length of time a QUIC retry token is considered valid.
372
-         * @since v23.8.0
373
-         */
374
-        retryTokenExpiration?: bigint | number | undefined;
375
-        /**
376
-         * Specifies the 16-byte secret used to generate QUIC retry tokens.
377
-         * @since v23.8.0
378
-         */
379
-        resetTokenSecret?: NodeJS.ArrayBufferView | undefined;
380
-        /**
381
-         * Specifies the length of time a QUIC token is considered valid.
382
-         * @since v23.8.0
383
-         */
384
-        tokenExpiration?: bigint | number | undefined;
385
-        /**
386
-         * Specifies the 16-byte secret used to generate QUIC tokens.
387
-         * @since v23.8.0
388
-         */
389
-        tokenSecret?: NodeJS.ArrayBufferView | undefined;
390
-        /**
391
-         * @since v23.8.0
392
-         */
393
-        udpReceiveBufferSize?: number | undefined;
394
-        /**
395
-         * @since v23.8.0
396
-         */
397
-        udpSendBufferSize?: number | undefined;
398
-        /**
399
-         * @since v23.8.0
400
-         */
401
-        udpTTL?: number | undefined;
402
-        /**
403
-         * When `true`, requires that the endpoint validate peer addresses using retry packets
404
-         * while establishing a new connection.
405
-         * @since v23.8.0
406
-         */
407
-        validateAddress?: boolean | undefined;
408
-    }
409
-    /**
410
-     * A `QuicEndpoint` encapsulates the local UDP-port binding for QUIC. It can be
411
-     * used as both a client and a server.
412
-     * @since v23.8.0
413
-     */
414
-    class QuicEndpoint implements AsyncDisposable {
415
-        constructor(options?: EndpointOptions);
416
-        /**
417
-         * The local UDP socket address to which the endpoint is bound, if any.
418
-         *
419
-         * If the endpoint is not currently bound then the value will be `undefined`. Read only.
420
-         * @since v23.8.0
421
-         */
422
-        readonly address: SocketAddress | undefined;
423
-        /**
424
-         * When `endpoint.busy` is set to true, the endpoint will temporarily reject
425
-         * new sessions from being created. Read/write.
426
-         *
427
-         * ```js
428
-         * // Mark the endpoint busy. New sessions will be prevented.
429
-         * endpoint.busy = true;
430
-         *
431
-         * // Mark the endpoint free. New session will be allowed.
432
-         * endpoint.busy = false;
433
-         * ```
434
-         *
435
-         * The `busy` property is useful when the endpoint is under heavy load and needs to
436
-         * temporarily reject new sessions while it catches up.
437
-         * @since v23.8.0
438
-         */
439
-        busy: boolean;
440
-        /**
441
-         * Gracefully close the endpoint. The endpoint will close and destroy itself when
442
-         * all currently open sessions close. Once called, new sessions will be rejected.
443
-         *
444
-         * Returns a promise that is fulfilled when the endpoint is destroyed.
445
-         * @since v23.8.0
446
-         */
447
-        close(): Promise<void>;
448
-        /**
449
-         * A promise that is fulfilled when the endpoint is destroyed. This will be the same promise that is
450
-         * returned by the `endpoint.close()` function. Read only.
451
-         * @since v23.8.0
452
-         */
453
-        readonly closed: Promise<void>;
454
-        /**
455
-         * True if `endpoint.close()` has been called and closing the endpoint has not yet completed.
456
-         * Read only.
457
-         * @since v23.8.0
458
-         */
459
-        readonly closing: boolean;
460
-        /**
461
-         * Forcefully closes the endpoint by forcing all open sessions to be immediately
462
-         * closed.
463
-         * @since v23.8.0
464
-         */
465
-        destroy(error?: any): void;
466
-        /**
467
-         * True if `endpoint.destroy()` has been called. Read only.
468
-         * @since v23.8.0
469
-         */
470
-        readonly destroyed: boolean;
471
-        /**
472
-         * The statistics collected for an active session. Read only.
473
-         * @since v23.8.0
474
-         */
475
-        readonly stats: QuicEndpoint.Stats;
476
-        /**
477
-         * Calls `endpoint.close()` and returns a promise that fulfills when the
478
-         * endpoint has closed.
479
-         * @since v23.8.0
480
-         */
481
-        [Symbol.asyncDispose](): Promise<void>;
482
-    }
483
-    namespace QuicEndpoint {
484
-        /**
485
-         * A view of the collected statistics for an endpoint.
486
-         * @since v23.8.0
487
-         */
488
-        class Stats {
489
-            private constructor();
490
-            /**
491
-             * A timestamp indicating the moment the endpoint was created. Read only.
492
-             * @since v23.8.0
493
-             */
494
-            readonly createdAt: bigint;
495
-            /**
496
-             * A timestamp indicating the moment the endpoint was destroyed. Read only.
497
-             * @since v23.8.0
498
-             */
499
-            readonly destroyedAt: bigint;
500
-            /**
501
-             * The total number of bytes received by this endpoint. Read only.
502
-             * @since v23.8.0
503
-             */
504
-            readonly bytesReceived: bigint;
505
-            /**
506
-             * The total number of bytes sent by this endpoint. Read only.
507
-             * @since v23.8.0
508
-             */
509
-            readonly bytesSent: bigint;
510
-            /**
511
-             * The total number of QUIC packets successfully received by this endpoint. Read only.
512
-             * @since v23.8.0
513
-             */
514
-            readonly packetsReceived: bigint;
515
-            /**
516
-             * The total number of QUIC packets successfully sent by this endpoint. Read only.
517
-             * @since v23.8.0
518
-             */
519
-            readonly packetsSent: bigint;
520
-            /**
521
-             * The total number of peer-initiated sessions received by this endpoint. Read only.
522
-             * @since v23.8.0
523
-             */
524
-            readonly serverSessions: bigint;
525
-            /**
526
-             * The total number of sessions initiated by this endpoint. Read only.
527
-             * @since v23.8.0
528
-             */
529
-            readonly clientSessions: bigint;
530
-            /**
531
-             * The total number of times an initial packet was rejected due to the
532
-             * endpoint being marked busy. Read only.
533
-             * @since v23.8.0
534
-             */
535
-            readonly serverBusyCount: bigint;
536
-            /**
537
-             * The total number of QUIC retry attempts on this endpoint. Read only.
538
-             * @since v23.8.0
539
-             */
540
-            readonly retryCount: bigint;
541
-            /**
542
-             * The total number sessions rejected due to QUIC version mismatch. Read only.
543
-             * @since v23.8.0
544
-             */
545
-            readonly versionNegotiationCount: bigint;
546
-            /**
547
-             * The total number of stateless resets handled by this endpoint. Read only.
548
-             * @since v23.8.0
549
-             */
550
-            readonly statelessResetCount: bigint;
551
-            /**
552
-             * The total number of sessions that were closed before handshake completed. Read only.
553
-             * @since v23.8.0
554
-             */
555
-            readonly immediateCloseCount: bigint;
556
-        }
557
-    }
558
-    interface CreateStreamOptions {
559
-        body?: ArrayBuffer | NodeJS.ArrayBufferView | Blob | undefined;
560
-        sendOrder?: number | undefined;
561
-    }
562
-    interface SessionPath {
563
-        local: SocketAddress;
564
-        remote: SocketAddress;
565
-    }
566
-    /**
567
-     * A `QuicSession` represents the local side of a QUIC connection.
568
-     * @since v23.8.0
569
-     */
570
-    class QuicSession implements AsyncDisposable {
571
-        private constructor();
572
-        /**
573
-         * Initiate a graceful close of the session. Existing streams will be allowed
574
-         * to complete but no new streams will be opened. Once all streams have closed,
575
-         * the session will be destroyed. The returned promise will be fulfilled once
576
-         * the session has been destroyed.
577
-         * @since v23.8.0
578
-         */
579
-        close(): Promise<void>;
580
-        /**
581
-         * A promise that is fulfilled once the session is destroyed.
582
-         * @since v23.8.0
583
-         */
584
-        readonly closed: Promise<void>;
585
-        /**
586
-         * Immediately destroy the session. All streams will be destroys and the
587
-         * session will be closed.
588
-         * @since v23.8.0
589
-         */
590
-        destroy(error?: any): void;
591
-        /**
592
-         * True if `session.destroy()` has been called. Read only.
593
-         * @since v23.8.0
594
-         */
595
-        readonly destroyed: boolean;
596
-        /**
597
-         * The endpoint that created this session. Read only.
598
-         * @since v23.8.0
599
-         */
600
-        readonly endpoint: QuicEndpoint;
601
-        /**
602
-         * The callback to invoke when a new stream is initiated by a remote peer. Read/write.
603
-         * @since v23.8.0
604
-         */
605
-        onstream: OnStreamCallback | undefined;
606
-        /**
607
-         * The callback to invoke when a new datagram is received from a remote peer. Read/write.
608
-         * @since v23.8.0
609
-         */
610
-        ondatagram: OnDatagramCallback | undefined;
611
-        /**
612
-         * The callback to invoke when the status of a datagram is updated. Read/write.
613
-         * @since v23.8.0
614
-         */
615
-        ondatagramstatus: OnDatagramStatusCallback | undefined;
616
-        /**
617
-         * The callback to invoke when the path validation is updated. Read/write.
618
-         * @since v23.8.0
619
-         */
620
-        onpathvalidation: OnPathValidationCallback | undefined;
621
-        /**
622
-         * The callback to invoke when a new session ticket is received. Read/write.
623
-         * @since v23.8.0
624
-         */
625
-        onsessionticket: OnSessionTicketCallback | undefined;
626
-        /**
627
-         * The callback to invoke when a version negotiation is initiated. Read/write.
628
-         * @since v23.8.0
629
-         */
630
-        onversionnegotiation: OnVersionNegotiationCallback | undefined;
631
-        /**
632
-         * The callback to invoke when the TLS handshake is completed. Read/write.
633
-         * @since v23.8.0
634
-         */
635
-        onhandshake: OnHandshakeCallback | undefined;
636
-        /**
637
-         * Open a new bidirectional stream. If the `body` option is not specified,
638
-         * the outgoing stream will be half-closed.
639
-         * @since v23.8.0
640
-         */
641
-        createBidirectionalStream(options?: CreateStreamOptions): Promise<QuicStream>;
642
-        /**
643
-         * Open a new unidirectional stream. If the `body` option is not specified,
644
-         * the outgoing stream will be closed.
645
-         * @since v23.8.0
646
-         */
647
-        createUnidirectionalStream(options?: CreateStreamOptions): Promise<QuicStream>;
648
-        /**
649
-         * The local and remote socket addresses associated with the session. Read only.
650
-         * @since v23.8.0
651
-         */
652
-        path: SessionPath | undefined;
653
-        /**
654
-         * Sends an unreliable datagram to the remote peer, returning the datagram ID.
655
-         * If the datagram payload is specified as an `ArrayBufferView`, then ownership of
656
-         * that view will be transferred to the underlying stream.
657
-         * @since v23.8.0
658
-         */
659
-        sendDatagram(datagram: string | NodeJS.ArrayBufferView): bigint;
660
-        /**
661
-         * Return the current statistics for the session. Read only.
662
-         * @since v23.8.0
663
-         */
664
-        readonly stats: QuicSession.Stats;
665
-        /**
666
-         * Initiate a key update for the session.
667
-         * @since v23.8.0
668
-         */
669
-        updateKey(): void;
670
-        /**
671
-         * Calls `session.close()` and returns a promise that fulfills when the
672
-         * session has closed.
673
-         * @since v23.8.0
674
-         */
675
-        [Symbol.asyncDispose](): Promise<void>;
676
-    }
677
-    namespace QuicSession {
678
-        /**
679
-         * @since v23.8.0
680
-         */
681
-        class Stats {
682
-            private constructor();
683
-            /**
684
-             * @since v23.8.0
685
-             */
686
-            readonly createdAt: bigint;
687
-            /**
688
-             * @since v23.8.0
689
-             */
690
-            readonly closingAt: bigint;
691
-            /**
692
-             * @since v23.8.0
693
-             */
694
-            readonly handshakeCompletedAt: bigint;
695
-            /**
696
-             * @since v23.8.0
697
-             */
698
-            readonly handshakeConfirmedAt: bigint;
699
-            /**
700
-             * @since v23.8.0
701
-             */
702
-            readonly bytesReceived: bigint;
703
-            /**
704
-             * @since v23.8.0
705
-             */
706
-            readonly bytesSent: bigint;
707
-            /**
708
-             * @since v23.8.0
709
-             */
710
-            readonly bidiInStreamCount: bigint;
711
-            /**
712
-             * @since v23.8.0
713
-             */
714
-            readonly bidiOutStreamCount: bigint;
715
-            /**
716
-             * @since v23.8.0
717
-             */
718
-            readonly uniInStreamCount: bigint;
719
-            /**
720
-             * @since v23.8.0
721
-             */
722
-            readonly uniOutStreamCount: bigint;
723
-            /**
724
-             * @since v23.8.0
725
-             */
726
-            readonly maxBytesInFlights: bigint;
727
-            /**
728
-             * @since v23.8.0
729
-             */
730
-            readonly bytesInFlight: bigint;
731
-            /**
732
-             * @since v23.8.0
733
-             */
734
-            readonly blockCount: bigint;
735
-            /**
736
-             * @since v23.8.0
737
-             */
738
-            readonly cwnd: bigint;
739
-            /**
740
-             * @since v23.8.0
741
-             */
742
-            readonly latestRtt: bigint;
743
-            /**
744
-             * @since v23.8.0
745
-             */
746
-            readonly minRtt: bigint;
747
-            /**
748
-             * @since v23.8.0
749
-             */
750
-            readonly rttVar: bigint;
751
-            /**
752
-             * @since v23.8.0
753
-             */
754
-            readonly smoothedRtt: bigint;
755
-            /**
756
-             * @since v23.8.0
757
-             */
758
-            readonly ssthresh: bigint;
759
-            /**
760
-             * @since v23.8.0
761
-             */
762
-            readonly datagramsReceived: bigint;
763
-            /**
764
-             * @since v23.8.0
765
-             */
766
-            readonly datagramsSent: bigint;
767
-            /**
768
-             * @since v23.8.0
769
-             */
770
-            readonly datagramsAcknowledged: bigint;
771
-            /**
772
-             * @since v23.8.0
773
-             */
774
-            readonly datagramsLost: bigint;
775
-        }
776
-    }
777
-    /**
778
-     * @since v23.8.0
779
-     */
780
-    class QuicStream {
781
-        private constructor();
782
-        /**
783
-         * A promise that is fulfilled when the stream is fully closed.
784
-         * @since v23.8.0
785
-         */
786
-        readonly closed: Promise<void>;
787
-        /**
788
-         * Immediately and abruptly destroys the stream.
789
-         * @since v23.8.0
790
-         */
791
-        destroy(error?: any): void;
792
-        /**
793
-         * True if `stream.destroy()` has been called.
794
-         * @since v23.8.0
795
-         */
796
-        readonly destroyed: boolean;
797
-        /**
798
-         * The directionality of the stream. Read only.
799
-         * @since v23.8.0
800
-         */
801
-        readonly direction: "bidi" | "uni";
802
-        /**
803
-         * The stream ID. Read only.
804
-         * @since v23.8.0
805
-         */
806
-        readonly id: bigint;
807
-        /**
808
-         * The callback to invoke when the stream is blocked. Read/write.
809
-         * @since v23.8.0
810
-         */
811
-        onblocked: OnBlockedCallback | undefined;
812
-        /**
813
-         * The callback to invoke when the stream is reset. Read/write.
814
-         * @since v23.8.0
815
-         */
816
-        onreset: OnStreamErrorCallback | undefined;
817
-        /**
818
-         * @since v23.8.0
819
-         */
820
-        readonly readable: ReadableStream<Uint8Array>;
821
-        /**
822
-         * The session that created this stream. Read only.
823
-         * @since v23.8.0
824
-         */
825
-        readonly session: QuicSession;
826
-        /**
827
-         * The current statistics for the stream. Read only.
828
-         * @since v23.8.0
829
-         */
830
-        readonly stats: QuicStream.Stats;
831
-    }
832
-    namespace QuicStream {
833
-        /**
834
-         * @since v23.8.0
835
-         */
836
-        class Stats {
837
-            private constructor();
838
-            /**
839
-             * @since v23.8.0
840
-             */
841
-            readonly ackedAt: bigint;
842
-            /**
843
-             * @since v23.8.0
844
-             */
845
-            readonly bytesReceived: bigint;
846
-            /**
847
-             * @since v23.8.0
848
-             */
849
-            readonly bytesSent: bigint;
850
-            /**
851
-             * @since v23.8.0
852
-             */
853
-            readonly createdAt: bigint;
854
-            /**
855
-             * @since v23.8.0
856
-             */
857
-            readonly destroyedAt: bigint;
858
-            /**
859
-             * @since v23.8.0
860
-             */
861
-            readonly finalSize: bigint;
862
-            /**
863
-             * @since v23.8.0
864
-             */
865
-            readonly isConnected: bigint;
866
-            /**
867
-             * @since v23.8.0
868
-             */
869
-            readonly maxOffset: bigint;
870
-            /**
871
-             * @since v23.8.0
872
-             */
873
-            readonly maxOffsetAcknowledged: bigint;
874
-            /**
875
-             * @since v23.8.0
876
-             */
877
-            readonly maxOffsetReceived: bigint;
878
-            /**
879
-             * @since v23.8.0
880
-             */
881
-            readonly openedAt: bigint;
882
-            /**
883
-             * @since v23.8.0
884
-             */
885
-            readonly receivedAt: bigint;
886
-        }
887
-    }
888
-    namespace constants {
889
-        enum cc {
890
-            RENO = "reno",
891
-            CUBIC = "cubic",
892
-            BBR = "bbr",
893
-        }
894
-        const DEFAULT_CIPHERS: string;
895
-        const DEFAULT_GROUPS: string;
896
-    }
897
-}

+ 0 - 507
test/node_modules/@types/node/readline.d.ts

@@ -1,507 +0,0 @@
1
-declare module "node:readline" {
2
-    import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
3
-    interface Key {
4
-        sequence?: string | undefined;
5
-        name?: string | undefined;
6
-        ctrl?: boolean | undefined;
7
-        meta?: boolean | undefined;
8
-        shift?: boolean | undefined;
9
-    }
10
-    interface InterfaceEventMap {
11
-        "close": [];
12
-        "error": [error: Error];
13
-        "history": [history: string[]];
14
-        "line": [input: string];
15
-        "pause": [];
16
-        "resume": [];
17
-        "SIGCONT": [];
18
-        "SIGINT": [];
19
-        "SIGTSTP": [];
20
-    }
21
-    /**
22
-     * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
23
-     * single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream.
24
-     * The `output` stream is used to print prompts for user input that arrives on,
25
-     * and is read from, the `input` stream.
26
-     * @since v0.1.104
27
-     */
28
-    class Interface implements EventEmitter, Disposable {
29
-        /**
30
-         * NOTE: According to the documentation:
31
-         *
32
-         * > Instances of the `readline.Interface` class are constructed using the
33
-         * > `readline.createInterface()` method.
34
-         *
35
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
36
-         */
37
-        protected constructor(
38
-            input: NodeJS.ReadableStream,
39
-            output?: NodeJS.WritableStream,
40
-            completer?: Completer | AsyncCompleter,
41
-            terminal?: boolean,
42
-        );
43
-        /**
44
-         * NOTE: According to the documentation:
45
-         *
46
-         * > Instances of the `readline.Interface` class are constructed using the
47
-         * > `readline.createInterface()` method.
48
-         *
49
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
50
-         */
51
-        protected constructor(options: ReadLineOptions);
52
-        readonly terminal: boolean;
53
-        /**
54
-         * The current input data being processed by node.
55
-         *
56
-         * This can be used when collecting input from a TTY stream to retrieve the
57
-         * current value that has been processed thus far, prior to the `line` event
58
-         * being emitted. Once the `line` event has been emitted, this property will
59
-         * be an empty string.
60
-         *
61
-         * Be aware that modifying the value during the instance runtime may have
62
-         * unintended consequences if `rl.cursor` is not also controlled.
63
-         *
64
-         * **If not using a TTY stream for input, use the `'line'` event.**
65
-         *
66
-         * One possible use case would be as follows:
67
-         *
68
-         * ```js
69
-         * const values = ['lorem ipsum', 'dolor sit amet'];
70
-         * const rl = readline.createInterface(process.stdin);
71
-         * const showResults = debounce(() => {
72
-         *   console.log(
73
-         *     '\n',
74
-         *     values.filter((val) => val.startsWith(rl.line)).join(' '),
75
-         *   );
76
-         * }, 300);
77
-         * process.stdin.on('keypress', (c, k) => {
78
-         *   showResults();
79
-         * });
80
-         * ```
81
-         * @since v0.1.98
82
-         */
83
-        readonly line: string;
84
-        /**
85
-         * The cursor position relative to `rl.line`.
86
-         *
87
-         * This will track where the current cursor lands in the input string, when
88
-         * reading input from a TTY stream. The position of cursor determines the
89
-         * portion of the input string that will be modified as input is processed,
90
-         * as well as the column where the terminal caret will be rendered.
91
-         * @since v0.1.98
92
-         */
93
-        readonly cursor: number;
94
-        /**
95
-         * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
96
-         * @since v15.3.0, v14.17.0
97
-         * @return the current prompt string
98
-         */
99
-        getPrompt(): string;
100
-        /**
101
-         * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called.
102
-         * @since v0.1.98
103
-         */
104
-        setPrompt(prompt: string): void;
105
-        /**
106
-         * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new
107
-         * location at which to provide input.
108
-         *
109
-         * When called, `rl.prompt()` will resume the `input` stream if it has been
110
-         * paused.
111
-         *
112
-         * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written.
113
-         * @since v0.1.98
114
-         * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`.
115
-         */
116
-        prompt(preserveCursor?: boolean): void;
117
-        /**
118
-         * The `rl.question()` method displays the `query` by writing it to the `output`,
119
-         * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument.
120
-         *
121
-         * When called, `rl.question()` will resume the `input` stream if it has been
122
-         * paused.
123
-         *
124
-         * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written.
125
-         *
126
-         * The `callback` function passed to `rl.question()` does not follow the typical
127
-         * pattern of accepting an `Error` object or `null` as the first argument.
128
-         * The `callback` is called with the provided answer as the only argument.
129
-         *
130
-         * An error will be thrown if calling `rl.question()` after `rl.close()`.
131
-         *
132
-         * Example usage:
133
-         *
134
-         * ```js
135
-         * rl.question('What is your favorite food? ', (answer) => {
136
-         *   console.log(`Oh, so your favorite food is ${answer}`);
137
-         * });
138
-         * ```
139
-         *
140
-         * Using an `AbortController` to cancel a question.
141
-         *
142
-         * ```js
143
-         * const ac = new AbortController();
144
-         * const signal = ac.signal;
145
-         *
146
-         * rl.question('What is your favorite food? ', { signal }, (answer) => {
147
-         *   console.log(`Oh, so your favorite food is ${answer}`);
148
-         * });
149
-         *
150
-         * signal.addEventListener('abort', () => {
151
-         *   console.log('The food question timed out');
152
-         * }, { once: true });
153
-         *
154
-         * setTimeout(() => ac.abort(), 10000);
155
-         * ```
156
-         * @since v0.3.3
157
-         * @param query A statement or query to write to `output`, prepended to the prompt.
158
-         * @param callback A callback function that is invoked with the user's input in response to the `query`.
159
-         */
160
-        question(query: string, callback: (answer: string) => void): void;
161
-        question(query: string, options: Abortable, callback: (answer: string) => void): void;
162
-        /**
163
-         * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed
164
-         * later if necessary.
165
-         *
166
-         * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance.
167
-         * @since v0.3.4
168
-         */
169
-        pause(): this;
170
-        /**
171
-         * The `rl.resume()` method resumes the `input` stream if it has been paused.
172
-         * @since v0.3.4
173
-         */
174
-        resume(): this;
175
-        /**
176
-         * The `rl.close()` method closes the `Interface` instance and
177
-         * relinquishes control over the `input` and `output` streams. When called,
178
-         * the `'close'` event will be emitted.
179
-         *
180
-         * Calling `rl.close()` does not immediately stop other events (including `'line'`)
181
-         * from being emitted by the `Interface` instance.
182
-         * @since v0.1.98
183
-         */
184
-        close(): void;
185
-        /**
186
-         * Alias for `rl.close()`.
187
-         * @since v22.15.0
188
-         */
189
-        [Symbol.dispose](): void;
190
-        /**
191
-         * The `rl.write()` method will write either `data` or a key sequence identified
192
-         * by `key` to the `output`. The `key` argument is supported only if `output` is
193
-         * a `TTY` text terminal. See `TTY keybindings` for a list of key
194
-         * combinations.
195
-         *
196
-         * If `key` is specified, `data` is ignored.
197
-         *
198
-         * When called, `rl.write()` will resume the `input` stream if it has been
199
-         * paused.
200
-         *
201
-         * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written.
202
-         *
203
-         * ```js
204
-         * rl.write('Delete this!');
205
-         * // Simulate Ctrl+U to delete the line written previously
206
-         * rl.write(null, { ctrl: true, name: 'u' });
207
-         * ```
208
-         *
209
-         * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_.
210
-         * @since v0.1.98
211
-         */
212
-        write(data: string | Buffer, key?: Key): void;
213
-        write(data: undefined | null | string | Buffer, key: Key): void;
214
-        /**
215
-         * Returns the real position of the cursor in relation to the input
216
-         * prompt + string. Long input (wrapping) strings, as well as multiple
217
-         * line prompts are included in the calculations.
218
-         * @since v13.5.0, v12.16.0
219
-         */
220
-        getCursorPos(): CursorPos;
221
-        [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
222
-    }
223
-    interface Interface extends InternalEventEmitter<InterfaceEventMap> {}
224
-    type ReadLine = Interface; // type forwarded for backwards compatibility
225
-    type Completer = (line: string) => CompleterResult;
226
-    type AsyncCompleter = (
227
-        line: string,
228
-        callback: (err?: null | Error, result?: CompleterResult) => void,
229
-    ) => void;
230
-    type CompleterResult = [string[], string];
231
-    interface ReadLineOptions {
232
-        /**
233
-         * The [`Readable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream to listen to
234
-         */
235
-        input: NodeJS.ReadableStream;
236
-        /**
237
-         * The [`Writable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream to write readline data to.
238
-         */
239
-        output?: NodeJS.WritableStream | undefined;
240
-        /**
241
-         * An optional function used for Tab autocompletion.
242
-         */
243
-        completer?: Completer | AsyncCompleter | undefined;
244
-        /**
245
-         * `true` if the `input` and `output` streams should be treated like a TTY,
246
-         * and have ANSI/VT100 escape codes written to it.
247
-         * Default: checking `isTTY` on the `output` stream upon instantiation.
248
-         */
249
-        terminal?: boolean | undefined;
250
-        /**
251
-         * Initial list of history lines.
252
-         * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
253
-         * otherwise the history caching mechanism is not initialized at all.
254
-         * @default []
255
-         */
256
-        history?: string[] | undefined;
257
-        /**
258
-         * Maximum number of history lines retained.
259
-         * To disable the history set this value to `0`.
260
-         * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check,
261
-         * otherwise the history caching mechanism is not initialized at all.
262
-         * @default 30
263
-         */
264
-        historySize?: number | undefined;
265
-        /**
266
-         * If `true`, when a new input line added to the history list duplicates an older one,
267
-         * this removes the older line from the list.
268
-         * @default false
269
-         */
270
-        removeHistoryDuplicates?: boolean | undefined;
271
-        /**
272
-         * The prompt string to use.
273
-         * @default "> "
274
-         */
275
-        prompt?: string | undefined;
276
-        /**
277
-         * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds,
278
-         * both `\r` and `\n` will be treated as separate end-of-line input.
279
-         * `crlfDelay` will be coerced to a number no less than `100`.
280
-         * It can be set to `Infinity`, in which case
281
-         * `\r` followed by `\n` will always be considered a single newline
282
-         * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v25.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
283
-         * @default 100
284
-         */
285
-        crlfDelay?: number | undefined;
286
-        /**
287
-         * The duration `readline` will wait for a character
288
-         * (when reading an ambiguous key sequence in milliseconds
289
-         * one that can both form a complete key sequence using the input read so far
290
-         * and can take additional input to complete a longer key sequence).
291
-         * @default 500
292
-         */
293
-        escapeCodeTimeout?: number | undefined;
294
-        /**
295
-         * The number of spaces a tab is equal to (minimum 1).
296
-         * @default 8
297
-         */
298
-        tabSize?: number | undefined;
299
-        /**
300
-         * Allows closing the interface using an AbortSignal.
301
-         * Aborting the signal will internally call `close` on the interface.
302
-         */
303
-        signal?: AbortSignal | undefined;
304
-    }
305
-    /**
306
-     * The `readline.createInterface()` method creates a new `readline.Interface` instance.
307
-     *
308
-     * ```js
309
-     * import readline from 'node:readline';
310
-     * const rl = readline.createInterface({
311
-     *   input: process.stdin,
312
-     *   output: process.stdout,
313
-     * });
314
-     * ```
315
-     *
316
-     * Once the `readline.Interface` instance is created, the most common case is to
317
-     * listen for the `'line'` event:
318
-     *
319
-     * ```js
320
-     * rl.on('line', (line) => {
321
-     *   console.log(`Received: ${line}`);
322
-     * });
323
-     * ```
324
-     *
325
-     * If `terminal` is `true` for this instance then the `output` stream will get
326
-     * the best compatibility if it defines an `output.columns` property and emits
327
-     * a `'resize'` event on the `output` if or when the columns ever change
328
-     * (`process.stdout` does this automatically when it is a TTY).
329
-     *
330
-     * When creating a `readline.Interface` using `stdin` as input, the program
331
-     * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without
332
-     * waiting for user input, call `process.stdin.unref()`.
333
-     * @since v0.1.98
334
-     */
335
-    function createInterface(
336
-        input: NodeJS.ReadableStream,
337
-        output?: NodeJS.WritableStream,
338
-        completer?: Completer | AsyncCompleter,
339
-        terminal?: boolean,
340
-    ): Interface;
341
-    function createInterface(options: ReadLineOptions): Interface;
342
-    /**
343
-     * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
344
-     *
345
-     * Optionally, `interface` specifies a `readline.Interface` instance for which
346
-     * autocompletion is disabled when copy-pasted input is detected.
347
-     *
348
-     * If the `stream` is a `TTY`, then it must be in raw mode.
349
-     *
350
-     * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop
351
-     * the `input` from emitting `'keypress'` events.
352
-     *
353
-     * ```js
354
-     * readline.emitKeypressEvents(process.stdin);
355
-     * if (process.stdin.isTTY)
356
-     *   process.stdin.setRawMode(true);
357
-     * ```
358
-     *
359
-     * ## Example: Tiny CLI
360
-     *
361
-     * The following example illustrates the use of `readline.Interface` class to
362
-     * implement a small command-line interface:
363
-     *
364
-     * ```js
365
-     * import readline from 'node:readline';
366
-     * const rl = readline.createInterface({
367
-     *   input: process.stdin,
368
-     *   output: process.stdout,
369
-     *   prompt: 'OHAI> ',
370
-     * });
371
-     *
372
-     * rl.prompt();
373
-     *
374
-     * rl.on('line', (line) => {
375
-     *   switch (line.trim()) {
376
-     *     case 'hello':
377
-     *       console.log('world!');
378
-     *       break;
379
-     *     default:
380
-     *       console.log(`Say what? I might have heard '${line.trim()}'`);
381
-     *       break;
382
-     *   }
383
-     *   rl.prompt();
384
-     * }).on('close', () => {
385
-     *   console.log('Have a great day!');
386
-     *   process.exit(0);
387
-     * });
388
-     * ```
389
-     *
390
-     * ## Example: Read file stream line-by-Line
391
-     *
392
-     * A common use case for `readline` is to consume an input file one line at a
393
-     * time. The easiest way to do so is leveraging the `fs.ReadStream` API as
394
-     * well as a `for await...of` loop:
395
-     *
396
-     * ```js
397
-     * import fs from 'node:fs';
398
-     * import readline from 'node:readline';
399
-     *
400
-     * async function processLineByLine() {
401
-     *   const fileStream = fs.createReadStream('input.txt');
402
-     *
403
-     *   const rl = readline.createInterface({
404
-     *     input: fileStream,
405
-     *     crlfDelay: Infinity,
406
-     *   });
407
-     *   // Note: we use the crlfDelay option to recognize all instances of CR LF
408
-     *   // ('\r\n') in input.txt as a single line break.
409
-     *
410
-     *   for await (const line of rl) {
411
-     *     // Each line in input.txt will be successively available here as `line`.
412
-     *     console.log(`Line from file: ${line}`);
413
-     *   }
414
-     * }
415
-     *
416
-     * processLineByLine();
417
-     * ```
418
-     *
419
-     * Alternatively, one could use the `'line'` event:
420
-     *
421
-     * ```js
422
-     * import fs from 'node:fs';
423
-     * import readline from 'node:readline';
424
-     *
425
-     * const rl = readline.createInterface({
426
-     *   input: fs.createReadStream('sample.txt'),
427
-     *   crlfDelay: Infinity,
428
-     * });
429
-     *
430
-     * rl.on('line', (line) => {
431
-     *   console.log(`Line from file: ${line}`);
432
-     * });
433
-     * ```
434
-     *
435
-     * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied:
436
-     *
437
-     * ```js
438
-     * import { once } from 'node:events';
439
-     * import { createReadStream } from 'node:fs';
440
-     * import { createInterface } from 'node:readline';
441
-     *
442
-     * (async function processLineByLine() {
443
-     *   try {
444
-     *     const rl = createInterface({
445
-     *       input: createReadStream('big-file.txt'),
446
-     *       crlfDelay: Infinity,
447
-     *     });
448
-     *
449
-     *     rl.on('line', (line) => {
450
-     *       // Process the line.
451
-     *     });
452
-     *
453
-     *     await once(rl, 'close');
454
-     *
455
-     *     console.log('File processed.');
456
-     *   } catch (err) {
457
-     *     console.error(err);
458
-     *   }
459
-     * })();
460
-     * ```
461
-     * @since v0.7.7
462
-     */
463
-    function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
464
-    type Direction = -1 | 0 | 1;
465
-    interface CursorPos {
466
-        rows: number;
467
-        cols: number;
468
-    }
469
-    /**
470
-     * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream
471
-     * in a specified direction identified by `dir`.
472
-     * @since v0.7.7
473
-     * @param callback Invoked once the operation completes.
474
-     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
475
-     */
476
-    function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
477
-    /**
478
-     * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream from
479
-     * the current position of the cursor down.
480
-     * @since v0.7.7
481
-     * @param callback Invoked once the operation completes.
482
-     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
483
-     */
484
-    function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
485
-    /**
486
-     * The `readline.cursorTo()` method moves cursor to the specified position in a
487
-     * given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
488
-     * @since v0.7.7
489
-     * @param callback Invoked once the operation completes.
490
-     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
491
-     */
492
-    function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
493
-    /**
494
-     * The `readline.moveCursor()` method moves the cursor _relative_ to its current
495
-     * position in a given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
496
-     * @since v0.7.7
497
-     * @param callback Invoked once the operation completes.
498
-     * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
499
-     */
500
-    function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
501
-}
502
-declare module "node:readline" {
503
-    export * as promises from "node:readline/promises";
504
-}
505
-declare module "readline" {
506
-    export * from "node:readline";
507
-}

+ 0 - 158
test/node_modules/@types/node/readline/promises.d.ts

@@ -1,158 +0,0 @@
1
-declare module "node:readline/promises" {
2
-    import { Abortable } from "node:events";
3
-    import {
4
-        CompleterResult,
5
-        Direction,
6
-        Interface as _Interface,
7
-        ReadLineOptions as _ReadLineOptions,
8
-    } from "node:readline";
9
-    /**
10
-     * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a
11
-     * single `input` `Readable` stream and a single `output` `Writable` stream.
12
-     * The `output` stream is used to print prompts for user input that arrives on,
13
-     * and is read from, the `input` stream.
14
-     * @since v17.0.0
15
-     */
16
-    class Interface extends _Interface {
17
-        /**
18
-         * The `rl.question()` method displays the `query` by writing it to the `output`,
19
-         * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument.
20
-         *
21
-         * When called, `rl.question()` will resume the `input` stream if it has been
22
-         * paused.
23
-         *
24
-         * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written.
25
-         *
26
-         * If the question is called after `rl.close()`, it returns a rejected promise.
27
-         *
28
-         * Example usage:
29
-         *
30
-         * ```js
31
-         * const answer = await rl.question('What is your favorite food? ');
32
-         * console.log(`Oh, so your favorite food is ${answer}`);
33
-         * ```
34
-         *
35
-         * Using an `AbortSignal` to cancel a question.
36
-         *
37
-         * ```js
38
-         * const signal = AbortSignal.timeout(10_000);
39
-         *
40
-         * signal.addEventListener('abort', () => {
41
-         *   console.log('The food question timed out');
42
-         * }, { once: true });
43
-         *
44
-         * const answer = await rl.question('What is your favorite food? ', { signal });
45
-         * console.log(`Oh, so your favorite food is ${answer}`);
46
-         * ```
47
-         * @since v17.0.0
48
-         * @param query A statement or query to write to `output`, prepended to the prompt.
49
-         * @return A promise that is fulfilled with the user's input in response to the `query`.
50
-         */
51
-        question(query: string): Promise<string>;
52
-        question(query: string, options: Abortable): Promise<string>;
53
-    }
54
-    /**
55
-     * @since v17.0.0
56
-     */
57
-    class Readline {
58
-        /**
59
-         * @param stream A TTY stream.
60
-         */
61
-        constructor(
62
-            stream: NodeJS.WritableStream,
63
-            options?: {
64
-                autoCommit?: boolean | undefined;
65
-            },
66
-        );
67
-        /**
68
-         * The `rl.clearLine()` method adds to the internal list of pending action an
69
-         * action that clears current line of the associated `stream` in a specified
70
-         * direction identified by `dir`.
71
-         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
72
-         * @since v17.0.0
73
-         * @return this
74
-         */
75
-        clearLine(dir: Direction): this;
76
-        /**
77
-         * The `rl.clearScreenDown()` method adds to the internal list of pending action an
78
-         * action that clears the associated stream from the current position of the
79
-         * cursor down.
80
-         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
81
-         * @since v17.0.0
82
-         * @return this
83
-         */
84
-        clearScreenDown(): this;
85
-        /**
86
-         * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions.
87
-         * @since v17.0.0
88
-         */
89
-        commit(): Promise<void>;
90
-        /**
91
-         * The `rl.cursorTo()` method adds to the internal list of pending action an action
92
-         * that moves cursor to the specified position in the associated `stream`.
93
-         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
94
-         * @since v17.0.0
95
-         * @return this
96
-         */
97
-        cursorTo(x: number, y?: number): this;
98
-        /**
99
-         * The `rl.moveCursor()` method adds to the internal list of pending action an
100
-         * action that moves the cursor _relative_ to its current position in the
101
-         * associated `stream`.
102
-         * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor.
103
-         * @since v17.0.0
104
-         * @return this
105
-         */
106
-        moveCursor(dx: number, dy: number): this;
107
-        /**
108
-         * The `rl.rollback` methods clears the internal list of pending actions without
109
-         * sending it to the associated `stream`.
110
-         * @since v17.0.0
111
-         * @return this
112
-         */
113
-        rollback(): this;
114
-    }
115
-    type Completer = (line: string) => CompleterResult | Promise<CompleterResult>;
116
-    interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> {
117
-        /**
118
-         * An optional function used for Tab autocompletion.
119
-         */
120
-        completer?: Completer | undefined;
121
-    }
122
-    /**
123
-     * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.
124
-     *
125
-     * ```js
126
-     * import readlinePromises from 'node:readline/promises';
127
-     * const rl = readlinePromises.createInterface({
128
-     *   input: process.stdin,
129
-     *   output: process.stdout,
130
-     * });
131
-     * ```
132
-     *
133
-     * Once the `readlinePromises.Interface` instance is created, the most common case
134
-     * is to listen for the `'line'` event:
135
-     *
136
-     * ```js
137
-     * rl.on('line', (line) => {
138
-     *   console.log(`Received: ${line}`);
139
-     * });
140
-     * ```
141
-     *
142
-     * If `terminal` is `true` for this instance then the `output` stream will get
143
-     * the best compatibility if it defines an `output.columns` property and emits
144
-     * a `'resize'` event on the `output` if or when the columns ever change
145
-     * (`process.stdout` does this automatically when it is a TTY).
146
-     * @since v17.0.0
147
-     */
148
-    function createInterface(
149
-        input: NodeJS.ReadableStream,
150
-        output?: NodeJS.WritableStream,
151
-        completer?: Completer,
152
-        terminal?: boolean,
153
-    ): Interface;
154
-    function createInterface(options: ReadLineOptions): Interface;
155
-}
156
-declare module "readline/promises" {
157
-    export * from "node:readline/promises";
158
-}

+ 0 - 420
test/node_modules/@types/node/repl.d.ts

@@ -1,420 +0,0 @@
1
-declare module "node:repl" {
2
-    import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline";
3
-    import { InspectOptions } from "node:util";
4
-    import { Context } from "node:vm";
5
-    interface ReplOptions {
6
-        /**
7
-         * The input prompt to display.
8
-         * @default "> "
9
-         */
10
-        prompt?: string | undefined;
11
-        /**
12
-         * The `Readable` stream from which REPL input will be read.
13
-         * @default process.stdin
14
-         */
15
-        input?: NodeJS.ReadableStream | undefined;
16
-        /**
17
-         * The `Writable` stream to which REPL output will be written.
18
-         * @default process.stdout
19
-         */
20
-        output?: NodeJS.WritableStream | undefined;
21
-        /**
22
-         * If `true`, specifies that the output should be treated as a TTY terminal, and have
23
-         * ANSI/VT100 escape codes written to it.
24
-         * Default: checking the value of the `isTTY` property on the output stream upon
25
-         * instantiation.
26
-         */
27
-        terminal?: boolean | undefined;
28
-        /**
29
-         * The function to be used when evaluating each given line of input.
30
-         * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can
31
-         * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
32
-         * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#custom-evaluation-functions)
33
-         * section for more details.
34
-         */
35
-        eval?: REPLEval | undefined;
36
-        /**
37
-         * Defines if the repl prints output previews or not.
38
-         * @default `true` Always `false` in case `terminal` is falsy.
39
-         */
40
-        preview?: boolean | undefined;
41
-        /**
42
-         * If `true`, specifies that the default `writer` function should include ANSI color
43
-         * styling to REPL output. If a custom `writer` function is provided then this has no
44
-         * effect.
45
-         * @default the REPL instance's `terminal` value
46
-         */
47
-        useColors?: boolean | undefined;
48
-        /**
49
-         * If `true`, specifies that the default evaluation function will use the JavaScript
50
-         * `global` as the context as opposed to creating a new separate context for the REPL
51
-         * instance. The node CLI REPL sets this value to `true`.
52
-         * @default false
53
-         */
54
-        useGlobal?: boolean | undefined;
55
-        /**
56
-         * If `true`, specifies that the default writer will not output the return value of a
57
-         * command if it evaluates to `undefined`.
58
-         * @default false
59
-         */
60
-        ignoreUndefined?: boolean | undefined;
61
-        /**
62
-         * The function to invoke to format the output of each command before writing to `output`.
63
-         * @default a wrapper for `util.inspect`
64
-         *
65
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_customizing_repl_output
66
-         */
67
-        writer?: REPLWriter | undefined;
68
-        /**
69
-         * An optional function used for custom Tab auto completion.
70
-         *
71
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#readline_use_of_the_completer_function
72
-         */
73
-        completer?: Completer | AsyncCompleter | undefined;
74
-        /**
75
-         * A flag that specifies whether the default evaluator executes all JavaScript commands in
76
-         * strict mode or default (sloppy) mode.
77
-         * Accepted values are:
78
-         * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
79
-         * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
80
-         *   prefacing every repl statement with `'use strict'`.
81
-         */
82
-        replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
83
-        /**
84
-         * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
85
-         * pressed. This cannot be used together with a custom `eval` function.
86
-         * @default false
87
-         */
88
-        breakEvalOnSigint?: boolean | undefined;
89
-        /**
90
-         * This function customizes error handling in the REPL.
91
-         * It receives the thrown exception as its first argument and must return one
92
-         * of the following values synchronously:
93
-         * * `'print'` to print the error to the output stream (default behavior).
94
-         * * `'ignore'` to skip all remaining error handling.
95
-         * * `'unhandled'` to treat the exception as fully unhandled. In this case,
96
-         *   the error will be passed to process-wide exception handlers, such as
97
-         *   the `'uncaughtException'` event.
98
-         *   The `'unhandled'` value may or may not be desirable in situations
99
-         *   where the `REPLServer` instance has been closed, depending on the particular
100
-         *   use case.
101
-         * @since v25.9.0
102
-         */
103
-        handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined;
104
-    }
105
-    type REPLEval = (
106
-        this: REPLServer,
107
-        evalCmd: string,
108
-        context: Context,
109
-        file: string,
110
-        cb: (err: Error | null, result: any) => void,
111
-    ) => void;
112
-    type REPLWriter = (this: REPLServer, obj: any) => string;
113
-    /**
114
-     * This is the default "writer" value, if none is passed in the REPL options,
115
-     * and it can be overridden by custom print functions.
116
-     */
117
-    const writer: REPLWriter & {
118
-        options: InspectOptions;
119
-    };
120
-    type REPLCommandAction = (this: REPLServer, text: string) => void;
121
-    interface REPLCommand {
122
-        /**
123
-         * Help text to be displayed when `.help` is entered.
124
-         */
125
-        help?: string | undefined;
126
-        /**
127
-         * The function to execute, optionally accepting a single string argument.
128
-         */
129
-        action: REPLCommandAction;
130
-    }
131
-    interface REPLServerSetupHistoryOptions {
132
-        filePath?: string | undefined;
133
-        size?: number | undefined;
134
-        removeHistoryDuplicates?: boolean | undefined;
135
-        onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
136
-    }
137
-    interface REPLServerEventMap extends InterfaceEventMap {
138
-        "exit": [];
139
-        "reset": [context: Context];
140
-    }
141
-    /**
142
-     * Instances of `repl.REPLServer` are created using the {@link start} method
143
-     * or directly using the JavaScript `new` keyword.
144
-     *
145
-     * ```js
146
-     * import repl from 'node:repl';
147
-     *
148
-     * const options = { useColors: true };
149
-     *
150
-     * const firstInstance = repl.start(options);
151
-     * const secondInstance = new repl.REPLServer(options);
152
-     * ```
153
-     * @since v0.1.91
154
-     */
155
-    class REPLServer extends Interface {
156
-        /**
157
-         * NOTE: According to the documentation:
158
-         *
159
-         * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
160
-         * > _should not_ be created directly using the JavaScript `new` keyword.
161
-         *
162
-         * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
163
-         *
164
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_class_replserver
165
-         */
166
-        private constructor();
167
-        /**
168
-         * The `vm.Context` provided to the `eval` function to be used for JavaScript
169
-         * evaluation.
170
-         */
171
-        readonly context: Context;
172
-        /**
173
-         * @deprecated since v14.3.0 - Use `input` instead.
174
-         */
175
-        readonly inputStream: NodeJS.ReadableStream;
176
-        /**
177
-         * @deprecated since v14.3.0 - Use `output` instead.
178
-         */
179
-        readonly outputStream: NodeJS.WritableStream;
180
-        /**
181
-         * The `Readable` stream from which REPL input will be read.
182
-         */
183
-        readonly input: NodeJS.ReadableStream;
184
-        /**
185
-         * The `Writable` stream to which REPL output will be written.
186
-         */
187
-        readonly output: NodeJS.WritableStream;
188
-        /**
189
-         * The commands registered via `replServer.defineCommand()`.
190
-         */
191
-        readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
192
-        /**
193
-         * A value indicating whether the REPL is currently in "editor mode".
194
-         *
195
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_commands_and_special_keys
196
-         */
197
-        readonly editorMode: boolean;
198
-        /**
199
-         * A value indicating whether the `_` variable has been assigned.
200
-         *
201
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
202
-         */
203
-        readonly underscoreAssigned: boolean;
204
-        /**
205
-         * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
206
-         *
207
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
208
-         */
209
-        readonly last: any;
210
-        /**
211
-         * A value indicating whether the `_error` variable has been assigned.
212
-         *
213
-         * @since v9.8.0
214
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
215
-         */
216
-        readonly underscoreErrAssigned: boolean;
217
-        /**
218
-         * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
219
-         *
220
-         * @since v9.8.0
221
-         * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
222
-         */
223
-        readonly lastError: any;
224
-        /**
225
-         * Specified in the REPL options, this is the function to be used when evaluating each
226
-         * given line of input. If not specified in the REPL options, this is an async wrapper
227
-         * for the JavaScript `eval()` function.
228
-         */
229
-        readonly eval: REPLEval;
230
-        /**
231
-         * Specified in the REPL options, this is a value indicating whether the default
232
-         * `writer` function should include ANSI color styling to REPL output.
233
-         */
234
-        readonly useColors: boolean;
235
-        /**
236
-         * Specified in the REPL options, this is a value indicating whether the default `eval`
237
-         * function will use the JavaScript `global` as the context as opposed to creating a new
238
-         * separate context for the REPL instance.
239
-         */
240
-        readonly useGlobal: boolean;
241
-        /**
242
-         * Specified in the REPL options, this is a value indicating whether the default `writer`
243
-         * function should output the result of a command if it evaluates to `undefined`.
244
-         */
245
-        readonly ignoreUndefined: boolean;
246
-        /**
247
-         * Specified in the REPL options, this is the function to invoke to format the output of
248
-         * each command before writing to `outputStream`. If not specified in the REPL options,
249
-         * this will be a wrapper for `util.inspect`.
250
-         */
251
-        readonly writer: REPLWriter;
252
-        /**
253
-         * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
254
-         */
255
-        readonly completer: Completer | AsyncCompleter;
256
-        /**
257
-         * Specified in the REPL options, this is a flag that specifies whether the default `eval`
258
-         * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
259
-         * Possible values are:
260
-         * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
261
-         * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
262
-         *    prefacing every repl statement with `'use strict'`.
263
-         */
264
-        readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
265
-        /**
266
-         * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
267
-         * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
268
-         * properties:
269
-         *
270
-         * The following example shows two new commands added to the REPL instance:
271
-         *
272
-         * ```js
273
-         * import repl from 'node:repl';
274
-         *
275
-         * const replServer = repl.start({ prompt: '> ' });
276
-         * replServer.defineCommand('sayhello', {
277
-         *   help: 'Say hello',
278
-         *   action(name) {
279
-         *     this.clearBufferedCommand();
280
-         *     console.log(`Hello, ${name}!`);
281
-         *     this.displayPrompt();
282
-         *   },
283
-         * });
284
-         * replServer.defineCommand('saybye', function saybye() {
285
-         *   console.log('Goodbye!');
286
-         *   this.close();
287
-         * });
288
-         * ```
289
-         *
290
-         * The new commands can then be used from within the REPL instance:
291
-         *
292
-         * ```console
293
-         * > .sayhello Node.js User
294
-         * Hello, Node.js User!
295
-         * > .saybye
296
-         * Goodbye!
297
-         * ```
298
-         * @since v0.3.0
299
-         * @param keyword The command keyword (_without_ a leading `.` character).
300
-         * @param cmd The function to invoke when the command is processed.
301
-         */
302
-        defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
303
-        /**
304
-         * The `replServer.displayPrompt()` method readies the REPL instance for input
305
-         * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input.
306
-         *
307
-         * When multi-line input is being entered, a pipe `'|'` is printed rather than the
308
-         * 'prompt'.
309
-         *
310
-         * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`.
311
-         *
312
-         * The `replServer.displayPrompt` method is primarily intended to be called from
313
-         * within the action function for commands registered using the `replServer.defineCommand()` method.
314
-         * @since v0.1.91
315
-         */
316
-        displayPrompt(preserveCursor?: boolean): void;
317
-        /**
318
-         * The `replServer.clearBufferedCommand()` method clears any command that has been
319
-         * buffered but not yet executed. This method is primarily intended to be
320
-         * called from within the action function for commands registered using the `replServer.defineCommand()` method.
321
-         * @since v9.0.0
322
-         */
323
-        clearBufferedCommand(): void;
324
-        /**
325
-         * Initializes a history log file for the REPL instance. When executing the
326
-         * Node.js binary and using the command-line REPL, a history file is initialized
327
-         * by default. However, this is not the case when creating a REPL
328
-         * programmatically. Use this method to initialize a history log file when working
329
-         * with REPL instances programmatically.
330
-         * @since v11.10.0
331
-         * @param historyPath the path to the history file
332
-         * @param callback called when history writes are ready or upon error
333
-         */
334
-        setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void;
335
-        setupHistory(
336
-            historyConfig?: REPLServerSetupHistoryOptions,
337
-            callback?: (err: Error | null, repl: this) => void,
338
-        ): void;
339
-        // #region InternalEventEmitter
340
-        addListener<E extends keyof REPLServerEventMap>(
341
-            eventName: E,
342
-            listener: (...args: REPLServerEventMap[E]) => void,
343
-        ): this;
344
-        addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
345
-        emit<E extends keyof REPLServerEventMap>(eventName: E, ...args: REPLServerEventMap[E]): boolean;
346
-        emit(eventName: string | symbol, ...args: any[]): boolean;
347
-        listenerCount<E extends keyof REPLServerEventMap>(
348
-            eventName: E,
349
-            listener?: (...args: REPLServerEventMap[E]) => void,
350
-        ): number;
351
-        listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
352
-        listeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
353
-        listeners(eventName: string | symbol): ((...args: any[]) => void)[];
354
-        off<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
355
-        off(eventName: string | symbol, listener: (...args: any[]) => void): this;
356
-        on<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
357
-        on(eventName: string | symbol, listener: (...args: any[]) => void): this;
358
-        once<E extends keyof REPLServerEventMap>(
359
-            eventName: E,
360
-            listener: (...args: REPLServerEventMap[E]) => void,
361
-        ): this;
362
-        once(eventName: string | symbol, listener: (...args: any[]) => void): this;
363
-        prependListener<E extends keyof REPLServerEventMap>(
364
-            eventName: E,
365
-            listener: (...args: REPLServerEventMap[E]) => void,
366
-        ): this;
367
-        prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
368
-        prependOnceListener<E extends keyof REPLServerEventMap>(
369
-            eventName: E,
370
-            listener: (...args: REPLServerEventMap[E]) => void,
371
-        ): this;
372
-        prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
373
-        rawListeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
374
-        rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
375
-        // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
376
-        removeAllListeners<E extends keyof REPLServerEventMap>(eventName?: E): this;
377
-        removeAllListeners(eventName?: string | symbol): this;
378
-        removeListener<E extends keyof REPLServerEventMap>(
379
-            eventName: E,
380
-            listener: (...args: REPLServerEventMap[E]) => void,
381
-        ): this;
382
-        removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
383
-        // #endregion
384
-    }
385
-    /**
386
-     * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
387
-     */
388
-    const REPL_MODE_SLOPPY: unique symbol;
389
-    /**
390
-     * A flag passed in the REPL options. Evaluates expressions in strict mode.
391
-     * This is equivalent to prefacing every repl statement with `'use strict'`.
392
-     */
393
-    const REPL_MODE_STRICT: unique symbol;
394
-    /**
395
-     * The `repl.start()` method creates and starts a {@link REPLServer} instance.
396
-     *
397
-     * If `options` is a string, then it specifies the input prompt:
398
-     *
399
-     * ```js
400
-     * import repl from 'node:repl';
401
-     *
402
-     * // a Unix style prompt
403
-     * repl.start('$ ');
404
-     * ```
405
-     * @since v0.1.91
406
-     */
407
-    function start(options?: string | ReplOptions): REPLServer;
408
-    /**
409
-     * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
410
-     *
411
-     * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_recoverable_errors
412
-     */
413
-    class Recoverable extends SyntaxError {
414
-        err: Error;
415
-        constructor(err: Error);
416
-    }
417
-}
418
-declare module "repl" {
419
-    export * from "node:repl";
420
-}

+ 0 - 0
test/node_modules/@types/node/sea.d.ts


Неке датотеке нису приказане због велике количине промена