@nocobase/plugin-multi-app-manager 1.2.12-alpha → 1.3.0-alpha.20240710084543

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/package.json +2 -2
  2. package/dist/client/AppManager.d.ts +0 -10
  3. package/dist/client/AppNameInput.d.ts +0 -10
  4. package/dist/client/MultiAppManagerProvider.d.ts +0 -10
  5. package/dist/client/MultiAppManagerProvider.style.d.ts +0 -13
  6. package/dist/client/Settings.d.ts +0 -10
  7. package/dist/client/index.d.ts +0 -14
  8. package/dist/client/index.js +0 -10
  9. package/dist/client/settings/schemas/applications.d.ts +0 -18
  10. package/dist/client/utils.d.ts +0 -12
  11. package/dist/externalVersion.js +0 -25
  12. package/dist/index.d.ts +0 -10
  13. package/dist/index.js +0 -48
  14. package/dist/locale/en-US.json +0 -11
  15. package/dist/locale/es-ES.json +0 -9
  16. package/dist/locale/index.d.ts +0 -9
  17. package/dist/locale/index.js +0 -36
  18. package/dist/locale/ko_KR.json +0 -11
  19. package/dist/locale/pt-BR.json +0 -9
  20. package/dist/locale/zh-CN.json +0 -14
  21. package/dist/node_modules/mariadb/LICENSE +0 -502
  22. package/dist/node_modules/mariadb/callback.js +0 -41
  23. package/dist/node_modules/mariadb/lib/cmd/batch-bulk.js +0 -278
  24. package/dist/node_modules/mariadb/lib/cmd/batch-rewrite.js +0 -372
  25. package/dist/node_modules/mariadb/lib/cmd/change-user.js +0 -149
  26. package/dist/node_modules/mariadb/lib/cmd/class/ok-packet.js +0 -17
  27. package/dist/node_modules/mariadb/lib/cmd/column-definition.js +0 -102
  28. package/dist/node_modules/mariadb/lib/cmd/command.js +0 -168
  29. package/dist/node_modules/mariadb/lib/cmd/common-binary-cmd.js +0 -327
  30. package/dist/node_modules/mariadb/lib/cmd/common-text-cmd.js +0 -427
  31. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/caching-sha2-password-auth.js +0 -168
  32. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/clear-password-auth.js +0 -23
  33. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/ed25519-password-auth.js +0 -761
  34. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js +0 -55
  35. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/pam-password-auth.js +0 -58
  36. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/plugin-auth.js +0 -19
  37. package/dist/node_modules/mariadb/lib/cmd/handshake/auth/sha256-password-auth.js +0 -142
  38. package/dist/node_modules/mariadb/lib/cmd/handshake/client-capabilities.js +0 -74
  39. package/dist/node_modules/mariadb/lib/cmd/handshake/client-handshake-response.js +0 -126
  40. package/dist/node_modules/mariadb/lib/cmd/handshake/handshake.js +0 -292
  41. package/dist/node_modules/mariadb/lib/cmd/handshake/initial-handshake.js +0 -74
  42. package/dist/node_modules/mariadb/lib/cmd/handshake/ssl-request.js +0 -29
  43. package/dist/node_modules/mariadb/lib/cmd/ping.js +0 -52
  44. package/dist/node_modules/mariadb/lib/cmd/query.js +0 -255
  45. package/dist/node_modules/mariadb/lib/cmd/quit.js +0 -28
  46. package/dist/node_modules/mariadb/lib/cmd/reset.js +0 -54
  47. package/dist/node_modules/mariadb/lib/cmd/resultset.js +0 -607
  48. package/dist/node_modules/mariadb/lib/cmd/stream.js +0 -45
  49. package/dist/node_modules/mariadb/lib/config/connection-options.js +0 -258
  50. package/dist/node_modules/mariadb/lib/config/pool-cluster-options.js +0 -19
  51. package/dist/node_modules/mariadb/lib/config/pool-options.js +0 -47
  52. package/dist/node_modules/mariadb/lib/connection-callback.js +0 -160
  53. package/dist/node_modules/mariadb/lib/connection.js +0 -1460
  54. package/dist/node_modules/mariadb/lib/const/capabilities.js +0 -64
  55. package/dist/node_modules/mariadb/lib/const/collations.js +0 -473
  56. package/dist/node_modules/mariadb/lib/const/connection_status.js +0 -13
  57. package/dist/node_modules/mariadb/lib/const/error-code.js +0 -1282
  58. package/dist/node_modules/mariadb/lib/const/field-detail.js +0 -35
  59. package/dist/node_modules/mariadb/lib/const/field-type.js +0 -71
  60. package/dist/node_modules/mariadb/lib/const/server-status.js +0 -30
  61. package/dist/node_modules/mariadb/lib/const/state-change.js +0 -12
  62. package/dist/node_modules/mariadb/lib/filtered-pool-cluster.js +0 -81
  63. package/dist/node_modules/mariadb/lib/io/bulk-packet.js +0 -590
  64. package/dist/node_modules/mariadb/lib/io/compression-input-stream.js +0 -141
  65. package/dist/node_modules/mariadb/lib/io/compression-output-stream.js +0 -171
  66. package/dist/node_modules/mariadb/lib/io/packet-input-stream.js +0 -193
  67. package/dist/node_modules/mariadb/lib/io/packet-node-encoded.js +0 -36
  68. package/dist/node_modules/mariadb/lib/io/packet-node-iconv.js +0 -37
  69. package/dist/node_modules/mariadb/lib/io/packet-output-stream.js +0 -502
  70. package/dist/node_modules/mariadb/lib/io/packet.js +0 -515
  71. package/dist/node_modules/mariadb/lib/io/rewrite-packet.js +0 -481
  72. package/dist/node_modules/mariadb/lib/misc/connection-information.js +0 -96
  73. package/dist/node_modules/mariadb/lib/misc/errors.js +0 -123
  74. package/dist/node_modules/mariadb/lib/misc/parse.js +0 -1033
  75. package/dist/node_modules/mariadb/lib/misc/utils.js +0 -298
  76. package/dist/node_modules/mariadb/lib/pool-base.js +0 -611
  77. package/dist/node_modules/mariadb/lib/pool-callback.js +0 -202
  78. package/dist/node_modules/mariadb/lib/pool-cluster-callback.js +0 -66
  79. package/dist/node_modules/mariadb/lib/pool-cluster.js +0 -407
  80. package/dist/node_modules/mariadb/lib/pool-promise.js +0 -108
  81. package/dist/node_modules/mariadb/node_modules/@types/node/assert/strict.d.ts +0 -8
  82. package/dist/node_modules/mariadb/node_modules/@types/node/assert.d.ts +0 -912
  83. package/dist/node_modules/mariadb/node_modules/@types/node/async_hooks.d.ts +0 -501
  84. package/dist/node_modules/mariadb/node_modules/@types/node/buffer.d.ts +0 -2232
  85. package/dist/node_modules/mariadb/node_modules/@types/node/child_process.d.ts +0 -1366
  86. package/dist/node_modules/mariadb/node_modules/@types/node/cluster.d.ts +0 -414
  87. package/dist/node_modules/mariadb/node_modules/@types/node/console.d.ts +0 -412
  88. package/dist/node_modules/mariadb/node_modules/@types/node/constants.d.ts +0 -18
  89. package/dist/node_modules/mariadb/node_modules/@types/node/crypto.d.ts +0 -3338
  90. package/dist/node_modules/mariadb/node_modules/@types/node/dgram.d.ts +0 -545
  91. package/dist/node_modules/mariadb/node_modules/@types/node/diagnostics_channel.d.ts +0 -152
  92. package/dist/node_modules/mariadb/node_modules/@types/node/dns/promises.d.ts +0 -370
  93. package/dist/node_modules/mariadb/node_modules/@types/node/dns.d.ts +0 -659
  94. package/dist/node_modules/mariadb/node_modules/@types/node/domain.d.ts +0 -169
  95. package/dist/node_modules/mariadb/node_modules/@types/node/events.d.ts +0 -651
  96. package/dist/node_modules/mariadb/node_modules/@types/node/fs/promises.d.ts +0 -1091
  97. package/dist/node_modules/mariadb/node_modules/@types/node/fs.d.ts +0 -3869
  98. package/dist/node_modules/mariadb/node_modules/@types/node/globals.d.ts +0 -294
  99. package/dist/node_modules/mariadb/node_modules/@types/node/globals.global.d.ts +0 -1
  100. package/dist/node_modules/mariadb/node_modules/@types/node/http.d.ts +0 -1396
  101. package/dist/node_modules/mariadb/node_modules/@types/node/http2.d.ts +0 -2101
  102. package/dist/node_modules/mariadb/node_modules/@types/node/https.d.ts +0 -391
  103. package/dist/node_modules/mariadb/node_modules/@types/node/index.d.ts +0 -129
  104. package/dist/node_modules/mariadb/node_modules/@types/node/inspector.d.ts +0 -2744
  105. package/dist/node_modules/mariadb/node_modules/@types/node/module.d.ts +0 -114
  106. package/dist/node_modules/mariadb/node_modules/@types/node/net.d.ts +0 -791
  107. package/dist/node_modules/mariadb/node_modules/@types/node/os.d.ts +0 -455
  108. package/dist/node_modules/mariadb/node_modules/@types/node/package.json +0 -220
  109. package/dist/node_modules/mariadb/node_modules/@types/node/path.d.ts +0 -180
  110. package/dist/node_modules/mariadb/node_modules/@types/node/perf_hooks.d.ts +0 -557
  111. package/dist/node_modules/mariadb/node_modules/@types/node/process.d.ts +0 -1481
  112. package/dist/node_modules/mariadb/node_modules/@types/node/punycode.d.ts +0 -117
  113. package/dist/node_modules/mariadb/node_modules/@types/node/querystring.d.ts +0 -131
  114. package/dist/node_modules/mariadb/node_modules/@types/node/readline.d.ts +0 -650
  115. package/dist/node_modules/mariadb/node_modules/@types/node/repl.d.ts +0 -424
  116. package/dist/node_modules/mariadb/node_modules/@types/node/stream/consumers.d.ts +0 -24
  117. package/dist/node_modules/mariadb/node_modules/@types/node/stream/promises.d.ts +0 -42
  118. package/dist/node_modules/mariadb/node_modules/@types/node/stream/web.d.ts +0 -330
  119. package/dist/node_modules/mariadb/node_modules/@types/node/stream.d.ts +0 -1249
  120. package/dist/node_modules/mariadb/node_modules/@types/node/string_decoder.d.ts +0 -67
  121. package/dist/node_modules/mariadb/node_modules/@types/node/timers/promises.d.ts +0 -68
  122. package/dist/node_modules/mariadb/node_modules/@types/node/timers.d.ts +0 -94
  123. package/dist/node_modules/mariadb/node_modules/@types/node/tls.d.ts +0 -1020
  124. package/dist/node_modules/mariadb/node_modules/@types/node/trace_events.d.ts +0 -161
  125. package/dist/node_modules/mariadb/node_modules/@types/node/tty.d.ts +0 -204
  126. package/dist/node_modules/mariadb/node_modules/@types/node/url.d.ts +0 -891
  127. package/dist/node_modules/mariadb/node_modules/@types/node/util.d.ts +0 -1594
  128. package/dist/node_modules/mariadb/node_modules/@types/node/v8.d.ts +0 -378
  129. package/dist/node_modules/mariadb/node_modules/@types/node/vm.d.ts +0 -507
  130. package/dist/node_modules/mariadb/node_modules/@types/node/wasi.d.ts +0 -158
  131. package/dist/node_modules/mariadb/node_modules/@types/node/worker_threads.d.ts +0 -649
  132. package/dist/node_modules/mariadb/node_modules/@types/node/zlib.d.ts +0 -517
  133. package/dist/node_modules/mariadb/node_modules/iconv-lite/.github/dependabot.yml +0 -11
  134. package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/codeStyles/Project.xml +0 -47
  135. package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +0 -5
  136. package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/iconv-lite.iml +0 -12
  137. package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +0 -6
  138. package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/modules.xml +0 -8
  139. package/dist/node_modules/mariadb/node_modules/iconv-lite/.idea/vcs.xml +0 -6
  140. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -597
  141. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/dbcs-data.js +0 -188
  142. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/index.js +0 -23
  143. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/internal.js +0 -198
  144. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  145. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  146. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/sbcs-data.js +0 -179
  147. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  148. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  149. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  150. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  151. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  152. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  153. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  154. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  155. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/utf16.js +0 -197
  156. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/utf32.js +0 -319
  157. package/dist/node_modules/mariadb/node_modules/iconv-lite/encodings/utf7.js +0 -290
  158. package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  159. package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/index.d.ts +0 -41
  160. package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/index.js +0 -180
  161. package/dist/node_modules/mariadb/node_modules/iconv-lite/lib/streams.js +0 -109
  162. package/dist/node_modules/mariadb/node_modules/iconv-lite/package.json +0 -44
  163. package/dist/node_modules/mariadb/package.json +0 -1
  164. package/dist/node_modules/mariadb/promise.js +0 -34
  165. package/dist/node_modules/mariadb/types/index.d.ts +0 -870
  166. package/dist/server/collections/applications.d.ts +0 -10
  167. package/dist/server/collections/applications.js +0 -75
  168. package/dist/server/index.d.ts +0 -11
  169. package/dist/server/index.js +0 -40
  170. package/dist/server/models/application.d.ts +0 -18
  171. package/dist/server/models/application.js +0 -50
  172. package/dist/server/server.d.ts +0 -26
  173. package/dist/server/server.js +0 -310
  174. package/dist/swagger/index.d.ts +0 -195
  175. package/dist/swagger/index.js +0 -226
@@ -1,378 +0,0 @@
1
- /**
2
- * The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
3
- *
4
- * ```js
5
- * const v8 = require('v8');
6
- * ```
7
- * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/v8.js)
8
- */
9
- declare module 'v8' {
10
- import { Readable } from 'node:stream';
11
- interface HeapSpaceInfo {
12
- space_name: string;
13
- space_size: number;
14
- space_used_size: number;
15
- space_available_size: number;
16
- physical_space_size: number;
17
- }
18
- // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
19
- type DoesZapCodeSpaceFlag = 0 | 1;
20
- interface HeapInfo {
21
- total_heap_size: number;
22
- total_heap_size_executable: number;
23
- total_physical_size: number;
24
- total_available_size: number;
25
- used_heap_size: number;
26
- heap_size_limit: number;
27
- malloced_memory: number;
28
- peak_malloced_memory: number;
29
- does_zap_garbage: DoesZapCodeSpaceFlag;
30
- number_of_native_contexts: number;
31
- number_of_detached_contexts: number;
32
- }
33
- interface HeapCodeStatistics {
34
- code_and_metadata_size: number;
35
- bytecode_and_metadata_size: number;
36
- external_script_source_size: number;
37
- }
38
- /**
39
- * Returns an integer representing a version tag derived from the V8 version,
40
- * command-line flags, and detected CPU features. This is useful for determining
41
- * whether a `vm.Script` `cachedData` buffer is compatible with this instance
42
- * of V8.
43
- *
44
- * ```js
45
- * console.log(v8.cachedDataVersionTag()); // 3947234607
46
- * // The value returned by v8.cachedDataVersionTag() is derived from the V8
47
- * // version, command-line flags, and detected CPU features. Test that the value
48
- * // does indeed update when flags are toggled.
49
- * v8.setFlagsFromString('--allow_natives_syntax');
50
- * console.log(v8.cachedDataVersionTag()); // 183726201
51
- * ```
52
- * @since v8.0.0
53
- */
54
- function cachedDataVersionTag(): number;
55
- /**
56
- * Returns an object with the following properties:
57
- *
58
- * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
59
- * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
60
- * because it continuously touches all heap pages and that makes them less likely
61
- * to get swapped out by the operating system.
62
- *
63
- * `number_of_native_contexts` The value of native\_context is the number of the
64
- * top-level contexts currently active. Increase of this number over time indicates
65
- * a memory leak.
66
- *
67
- * `number_of_detached_contexts` The value of detached\_context is the number
68
- * of contexts that were detached and not yet garbage collected. This number
69
- * being non-zero indicates a potential memory leak.
70
- *
71
- * ```js
72
- * {
73
- * total_heap_size: 7326976,
74
- * total_heap_size_executable: 4194304,
75
- * total_physical_size: 7326976,
76
- * total_available_size: 1152656,
77
- * used_heap_size: 3476208,
78
- * heap_size_limit: 1535115264,
79
- * malloced_memory: 16384,
80
- * peak_malloced_memory: 1127496,
81
- * does_zap_garbage: 0,
82
- * number_of_native_contexts: 1,
83
- * number_of_detached_contexts: 0
84
- * }
85
- * ```
86
- * @since v1.0.0
87
- */
88
- function getHeapStatistics(): HeapInfo;
89
- /**
90
- * Returns statistics about the V8 heap spaces, i.e. the segments which make up
91
- * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
92
- * heap space can be guaranteed as the statistics are provided via the
93
- * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
94
- * next.
95
- *
96
- * The value returned is an array of objects containing the following properties:
97
- *
98
- * ```json
99
- * [
100
- * {
101
- * "space_name": "new_space",
102
- * "space_size": 2063872,
103
- * "space_used_size": 951112,
104
- * "space_available_size": 80824,
105
- * "physical_space_size": 2063872
106
- * },
107
- * {
108
- * "space_name": "old_space",
109
- * "space_size": 3090560,
110
- * "space_used_size": 2493792,
111
- * "space_available_size": 0,
112
- * "physical_space_size": 3090560
113
- * },
114
- * {
115
- * "space_name": "code_space",
116
- * "space_size": 1260160,
117
- * "space_used_size": 644256,
118
- * "space_available_size": 960,
119
- * "physical_space_size": 1260160
120
- * },
121
- * {
122
- * "space_name": "map_space",
123
- * "space_size": 1094160,
124
- * "space_used_size": 201608,
125
- * "space_available_size": 0,
126
- * "physical_space_size": 1094160
127
- * },
128
- * {
129
- * "space_name": "large_object_space",
130
- * "space_size": 0,
131
- * "space_used_size": 0,
132
- * "space_available_size": 1490980608,
133
- * "physical_space_size": 0
134
- * }
135
- * ]
136
- * ```
137
- * @since v6.0.0
138
- */
139
- function getHeapSpaceStatistics(): HeapSpaceInfo[];
140
- /**
141
- * The `v8.setFlagsFromString()` method can be used to programmatically set
142
- * V8 command-line flags. This method should be used with care. Changing settings
143
- * after the VM has started may result in unpredictable behavior, including
144
- * crashes and data loss; or it may simply do nothing.
145
- *
146
- * The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
147
- *
148
- * Usage:
149
- *
150
- * ```js
151
- * // Print GC events to stdout for one minute.
152
- * const v8 = require('v8');
153
- * v8.setFlagsFromString('--trace_gc');
154
- * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
155
- * ```
156
- * @since v1.0.0
157
- */
158
- function setFlagsFromString(flags: string): void;
159
- /**
160
- * Generates a snapshot of the current V8 heap and returns a Readable
161
- * Stream that may be used to read the JSON serialized representation.
162
- * This JSON stream format is intended to be used with tools such as
163
- * Chrome DevTools. The JSON schema is undocumented and specific to the
164
- * V8 engine. Therefore, the schema may change from one version of V8 to the next.
165
- *
166
- * ```js
167
- * // Print heap snapshot to the console
168
- * const v8 = require('v8');
169
- * const stream = v8.getHeapSnapshot();
170
- * stream.pipe(process.stdout);
171
- * ```
172
- * @since v11.13.0
173
- * @return A Readable Stream containing the V8 heap snapshot
174
- */
175
- function getHeapSnapshot(): Readable;
176
- /**
177
- * Generates a snapshot of the current V8 heap and writes it to a JSON
178
- * file. This file is intended to be used with tools such as Chrome
179
- * DevTools. The JSON schema is undocumented and specific to the V8
180
- * engine, and may change from one version of V8 to the next.
181
- *
182
- * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
183
- * not contain any information about the workers, and vice versa.
184
- *
185
- * ```js
186
- * const { writeHeapSnapshot } = require('v8');
187
- * const {
188
- * Worker,
189
- * isMainThread,
190
- * parentPort
191
- * } = require('worker_threads');
192
- *
193
- * if (isMainThread) {
194
- * const worker = new Worker(__filename);
195
- *
196
- * worker.once('message', (filename) => {
197
- * console.log(`worker heapdump: ${filename}`);
198
- * // Now get a heapdump for the main thread.
199
- * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
200
- * });
201
- *
202
- * // Tell the worker to create a heapdump.
203
- * worker.postMessage('heapdump');
204
- * } else {
205
- * parentPort.once('message', (message) => {
206
- * if (message === 'heapdump') {
207
- * // Generate a heapdump for the worker
208
- * // and return the filename to the parent.
209
- * parentPort.postMessage(writeHeapSnapshot());
210
- * }
211
- * });
212
- * }
213
- * ```
214
- * @since v11.13.0
215
- * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
216
- * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
217
- * worker thread.
218
- * @return The filename where the snapshot was saved.
219
- */
220
- function writeHeapSnapshot(filename?: string): string;
221
- /**
222
- * Returns an object with the following properties:
223
- *
224
- * ```js
225
- * {
226
- * code_and_metadata_size: 212208,
227
- * bytecode_and_metadata_size: 161368,
228
- * external_script_source_size: 1410794
229
- * }
230
- * ```
231
- * @since v12.8.0
232
- */
233
- function getHeapCodeStatistics(): HeapCodeStatistics;
234
- /**
235
- * @since v8.0.0
236
- */
237
- class Serializer {
238
- /**
239
- * Writes out a header, which includes the serialization format version.
240
- */
241
- writeHeader(): void;
242
- /**
243
- * Serializes a JavaScript value and adds the serialized representation to the
244
- * internal buffer.
245
- *
246
- * This throws an error if `value` cannot be serialized.
247
- */
248
- writeValue(val: any): boolean;
249
- /**
250
- * Returns the stored internal buffer. This serializer should not be used once
251
- * the buffer is released. Calling this method results in undefined behavior
252
- * if a previous write has failed.
253
- */
254
- releaseBuffer(): Buffer;
255
- /**
256
- * Marks an `ArrayBuffer` as having its contents transferred out of band.
257
- * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
258
- * @param id A 32-bit unsigned integer.
259
- * @param arrayBuffer An `ArrayBuffer` instance.
260
- */
261
- transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
262
- /**
263
- * Write a raw 32-bit unsigned integer.
264
- * For use inside of a custom `serializer._writeHostObject()`.
265
- */
266
- writeUint32(value: number): void;
267
- /**
268
- * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
269
- * For use inside of a custom `serializer._writeHostObject()`.
270
- */
271
- writeUint64(hi: number, lo: number): void;
272
- /**
273
- * Write a JS `number` value.
274
- * For use inside of a custom `serializer._writeHostObject()`.
275
- */
276
- writeDouble(value: number): void;
277
- /**
278
- * Write raw bytes into the serializer’s internal buffer. The deserializer
279
- * will require a way to compute the length of the buffer.
280
- * For use inside of a custom `serializer._writeHostObject()`.
281
- */
282
- writeRawBytes(buffer: NodeJS.TypedArray): void;
283
- }
284
- /**
285
- * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
286
- * stores the part of their underlying `ArrayBuffer`s that they are referring to.
287
- * @since v8.0.0
288
- */
289
- class DefaultSerializer extends Serializer {}
290
- /**
291
- * @since v8.0.0
292
- */
293
- class Deserializer {
294
- constructor(data: NodeJS.TypedArray);
295
- /**
296
- * Reads and validates a header (including the format version).
297
- * May, for example, reject an invalid or unsupported wire format. In that case,
298
- * an `Error` is thrown.
299
- */
300
- readHeader(): boolean;
301
- /**
302
- * Deserializes a JavaScript value from the buffer and returns it.
303
- */
304
- readValue(): any;
305
- /**
306
- * Marks an `ArrayBuffer` as having its contents transferred out of band.
307
- * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
308
- * `SharedArrayBuffer`s).
309
- * @param id A 32-bit unsigned integer.
310
- * @param arrayBuffer An `ArrayBuffer` instance.
311
- */
312
- transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
313
- /**
314
- * Reads the underlying wire format version. Likely mostly to be useful to
315
- * legacy code reading old wire format versions. May not be called before`.readHeader()`.
316
- */
317
- getWireFormatVersion(): number;
318
- /**
319
- * Read a raw 32-bit unsigned integer and return it.
320
- * For use inside of a custom `deserializer._readHostObject()`.
321
- */
322
- readUint32(): number;
323
- /**
324
- * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
325
- * For use inside of a custom `deserializer._readHostObject()`.
326
- */
327
- readUint64(): [number, number];
328
- /**
329
- * Read a JS `number` value.
330
- * For use inside of a custom `deserializer._readHostObject()`.
331
- */
332
- readDouble(): number;
333
- /**
334
- * Read raw bytes from the deserializer’s internal buffer. The `length` parameter
335
- * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
336
- * For use inside of a custom `deserializer._readHostObject()`.
337
- */
338
- readRawBytes(length: number): Buffer;
339
- }
340
- /**
341
- * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
342
- * @since v8.0.0
343
- */
344
- class DefaultDeserializer extends Deserializer {}
345
- /**
346
- * Uses a `DefaultSerializer` to serialize `value` into a buffer.
347
- * @since v8.0.0
348
- */
349
- function serialize(value: any): Buffer;
350
- /**
351
- * Uses a `DefaultDeserializer` with default options to read a JS value
352
- * from a buffer.
353
- * @since v8.0.0
354
- * @param buffer A buffer returned by {@link serialize}.
355
- */
356
- function deserialize(buffer: NodeJS.TypedArray): any;
357
- /**
358
- * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
359
- * times during the lifetime of the process. Each time the execution counter will
360
- * be reset and a new coverage report will be written to the directory specified
361
- * by `NODE_V8_COVERAGE`.
362
- *
363
- * When the process is about to exit, one last coverage will still be written to
364
- * disk unless {@link stopCoverage} is invoked before the process exits.
365
- * @since v15.1.0, v14.18.0, v12.22.0
366
- */
367
- function takeCoverage(): void;
368
- /**
369
- * The `v8.stopCoverage()` method allows the user to stop the coverage collection
370
- * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
371
- * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
372
- * @since v15.1.0, v14.18.0, v12.22.0
373
- */
374
- function stopCoverage(): void;
375
- }
376
- declare module 'node:v8' {
377
- export * from 'v8';
378
- }