@encharm/cws 4.4.1 → 4.5.1
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.
- package/dist/bindings/cws_darwin_arm64_node115.node +0 -0
- package/dist/bindings/cws_darwin_arm64_node127.node +0 -0
- package/dist/bindings/cws_linux_arm64_node115.node +0 -0
- package/dist/bindings/cws_linux_arm64_node127.node +0 -0
- package/dist/bindings/cws_linux_x64_node115.node +0 -0
- package/dist/bindings/cws_linux_x64_node127.node +0 -0
- package/dist/bindings/cws_win32_x64_node108.node +0 -0
- package/dist/bindings/cws_win32_x64_node115.node +0 -0
- package/dist/bindings/cws_win32_x64_node127.node +0 -0
- package/dist/bindings/cws_win32_x64_node83.node +0 -0
- package/dist/bindings/cws_win32_x64_node93.node +0 -0
- package/package.json +1 -1
- package/src/Addon.h +8 -23
- package/src/Socket.h +0 -1
- package/src/headers/22/acorn_version.h +6 -0
- package/src/headers/22/aliased_buffer-inl.h +243 -0
- package/src/headers/22/aliased_buffer.h +206 -0
- package/src/headers/{18 → 22}/async_wrap-inl.h +8 -6
- package/src/headers/{18 → 22}/async_wrap.h +65 -59
- package/src/headers/{16 → 22}/base_object-inl.h +57 -117
- package/src/headers/{18 → 22}/base_object.h +58 -30
- package/src/headers/22/base_object_types.h +74 -0
- package/src/headers/22/blob_serializer_deserializer-inl.h +385 -0
- package/src/headers/22/blob_serializer_deserializer.h +132 -0
- package/src/headers/{16 → 22}/callback_queue.h +1 -0
- package/src/headers/{16 → 22}/cares_wrap.h +27 -20
- package/src/headers/22/cjs_module_lexer_version.h +6 -0
- package/src/headers/22/cleanup_queue-inl.h +62 -0
- package/src/headers/22/cleanup_queue.h +85 -0
- package/src/headers/22/compile_cache.h +104 -0
- package/src/headers/{18 → 22}/crypto/crypto_clienthello.h +1 -1
- package/src/headers/{18 → 22}/crypto/crypto_context.h +31 -7
- package/src/headers/{18 → 22}/crypto/crypto_keys.h +118 -148
- package/src/headers/{18 → 22}/crypto/crypto_tls.h +20 -5
- package/src/headers/{18 → 22}/crypto/crypto_util.h +219 -263
- package/src/headers/22/crypto/ncrypto.h +752 -0
- package/src/headers/{16 → 22}/debug_utils-inl.h +15 -7
- package/src/headers/{18 → 22}/debug_utils.h +25 -19
- package/src/headers/22/encoding_binding.h +59 -0
- package/src/headers/{14 → 22}/env-inl.h +276 -409
- package/src/headers/22/env.h +1266 -0
- package/src/headers/22/env_properties.h +497 -0
- package/src/headers/{18 → 22}/handle_wrap.h +2 -0
- package/src/headers/{18 → 22}/histogram.h +88 -48
- package/src/headers/{16 → 22}/inspector_agent.h +17 -1
- package/src/headers/{16 → 22}/inspector_profiler.h +15 -13
- package/src/headers/{18 → 22}/js_native_api.h +78 -30
- package/src/headers/{18 → 22}/js_native_api_types.h +46 -1
- package/src/headers/{18 → 22}/js_native_api_v8.h +206 -161
- package/src/headers/{18 → 22}/js_native_api_v8_internals.h +6 -0
- package/src/headers/22/json_parser.h +40 -0
- package/src/headers/{16 → 22}/json_utils.h +19 -8
- package/src/headers/{18 → 22}/memory_tracker-inl.h +16 -13
- package/src/headers/{14 → 22}/memory_tracker.h +13 -8
- package/src/headers/{16 → 22}/module_wrap.h +49 -19
- package/src/headers/22/ncrypto/ncrypto.h +752 -0
- package/src/headers/{18 → 22}/node.h +465 -68
- package/src/headers/{18 → 22}/node_api.h +66 -81
- package/src/headers/{18 → 22}/node_api_internals.h +8 -4
- package/src/headers/{18 → 22}/node_api_types.h +5 -0
- package/src/headers/22/node_binding.h +154 -0
- package/src/headers/{18 → 22}/node_blob.h +46 -78
- package/src/headers/{18 → 22}/node_bob-inl.h +1 -2
- package/src/headers/{18 → 22}/node_bob.h +2 -6
- package/src/headers/{18 → 22}/node_buffer.h +1 -1
- package/src/headers/22/node_builtins.h +220 -0
- package/src/headers/{18 → 22}/node_constants.h +3 -5
- package/src/headers/22/node_context_data.h +168 -0
- package/src/headers/22/node_contextify.h +199 -0
- package/src/headers/{16 → 22}/node_crypto.h +1 -2
- package/src/headers/22/node_dotenv.h +45 -0
- package/src/headers/{18 → 22}/node_errors.h +86 -27
- package/src/headers/22/node_exit_code.h +54 -0
- package/src/headers/22/node_external_reference.h +249 -0
- package/src/headers/{18 → 22}/node_file-inl.h +127 -30
- package/src/headers/{16 → 22}/node_file.h +122 -11
- package/src/headers/{18 → 22}/node_http2.h +28 -11
- package/src/headers/{16 → 22}/node_http2_state.h +34 -25
- package/src/headers/{18 → 22}/node_http_common-inl.h +2 -1
- package/src/headers/{18 → 22}/node_http_common.h +56 -55
- package/src/headers/{16 → 22}/node_i18n.h +5 -18
- package/src/headers/{18 → 22}/node_internals.h +121 -59
- package/src/headers/{18 → 22}/node_main_instance.h +4 -31
- package/src/headers/{18 → 22}/node_messaging.h +27 -10
- package/src/headers/{18 → 22}/node_metadata.h +23 -1
- package/src/headers/{18 → 22}/node_options-inl.h +24 -11
- package/src/headers/{18 → 22}/node_options.h +124 -39
- package/src/headers/{18 → 22}/node_perf.h +0 -2
- package/src/headers/{18 → 22}/node_perf_common.h +20 -9
- package/src/headers/{18 → 22}/node_platform.h +11 -5
- package/src/headers/{18 → 22}/node_process.h +26 -14
- package/src/headers/22/node_realm-inl.h +145 -0
- package/src/headers/22/node_realm.h +184 -0
- package/src/headers/{16 → 22}/node_report.h +13 -17
- package/src/headers/{16 → 22}/node_revert.h +3 -3
- package/src/headers/{16 → 22}/node_root_certs.h +902 -461
- package/src/headers/22/node_sea.h +64 -0
- package/src/headers/22/node_shadow_realm.h +46 -0
- package/src/headers/22/node_snapshot_builder.h +57 -0
- package/src/headers/22/node_snapshotable.h +174 -0
- package/src/headers/{18 → 22}/node_sockaddr.h +2 -2
- package/src/headers/{16 → 22}/node_stat_watcher.h +2 -1
- package/src/headers/22/node_threadsafe_cow-inl.h +54 -0
- package/src/headers/22/node_threadsafe_cow.h +105 -0
- package/src/headers/22/node_union_bytes.h +81 -0
- package/src/headers/22/node_url.h +96 -0
- package/src/headers/22/node_v8.h +77 -0
- package/src/headers/{14 → 22}/node_v8_platform-inl.h +17 -6
- package/src/headers/{18 → 22}/node_version.h +20 -8
- package/src/headers/22/node_wasi.h +185 -0
- package/src/headers/{14 → 22}/node_watchdog.h +2 -0
- package/src/headers/{18 → 22}/node_worker.h +7 -2
- package/src/headers/22/permission/child_process_permission.h +31 -0
- package/src/headers/22/permission/fs_permission.h +167 -0
- package/src/headers/22/permission/inspector_permission.h +31 -0
- package/src/headers/22/permission/permission.h +99 -0
- package/src/headers/22/permission/permission_base.h +60 -0
- package/src/headers/22/permission/wasi_permission.h +31 -0
- package/src/headers/22/permission/worker_permission.h +31 -0
- package/src/headers/{16 → 22}/req_wrap-inl.h +7 -6
- package/src/headers/{14 → 22}/spawn_sync.h +3 -3
- package/src/headers/{18 → 22}/stream_base-inl.h +0 -135
- package/src/headers/{18 → 22}/stream_base.h +35 -16
- package/src/headers/{18 → 22}/stream_pipe.h +3 -4
- package/src/headers/{16 → 22}/stream_wrap.h +2 -1
- package/src/headers/{18 → 22}/string_bytes.h +5 -14
- package/src/headers/{14 → 22}/string_decoder-inl.h +0 -6
- package/src/headers/{16 → 22}/string_decoder.h +0 -1
- package/src/headers/{18 → 22}/tcp_wrap.h +1 -1
- package/src/headers/{18 → 22}/threadpoolwork-inl.h +14 -1
- package/src/headers/22/timers.h +76 -0
- package/src/headers/{18 → 22}/tracing/trace_event.h +7 -5
- package/src/headers/{16 → 22}/udp_wrap.h +8 -5
- package/src/headers/22/undici_version.h +6 -0
- package/src/headers/{18 → 22}/util-inl.h +97 -127
- package/src/headers/{18 → 22}/util.h +293 -106
- package/src/headers/{18 → 22}/v8-fast-api-calls.h +103 -58
- package/dist/bindings/cws_darwin_arm64_node83.node +0 -0
- package/dist/bindings/cws_darwin_arm64_node93.node +0 -0
- package/dist/bindings/cws_darwin_x64_node83.node +0 -0
- package/dist/bindings/cws_darwin_x64_node93.node +0 -0
- package/dist/bindings/cws_linux_arm64_node83.node +0 -0
- package/dist/bindings/cws_linux_arm64_node93.node +0 -0
- package/dist/bindings/cws_linux_x64_node83.node +0 -0
- package/dist/bindings/cws_linux_x64_node93.node +0 -0
- package/src/headers/14/aliased_buffer.h +0 -263
- package/src/headers/14/allocated_buffer-inl.h +0 -110
- package/src/headers/14/allocated_buffer.h +0 -73
- package/src/headers/14/async_wrap-inl.h +0 -94
- package/src/headers/14/async_wrap.h +0 -230
- package/src/headers/14/base64.h +0 -183
- package/src/headers/14/base_object-inl.h +0 -371
- package/src/headers/14/base_object.h +0 -281
- package/src/headers/14/callback_queue-inl.h +0 -97
- package/src/headers/14/callback_queue.h +0 -78
- package/src/headers/14/debug_utils-inl.h +0 -223
- package/src/headers/14/debug_utils.h +0 -181
- package/src/headers/14/env.h +0 -1388
- package/src/headers/14/handle_wrap.h +0 -117
- package/src/headers/14/histogram-inl.h +0 -83
- package/src/headers/14/histogram.h +0 -98
- package/src/headers/14/inspector_agent.h +0 -149
- package/src/headers/14/inspector_profiler.h +0 -137
- package/src/headers/14/js_native_api.h +0 -544
- package/src/headers/14/js_native_api_types.h +0 -143
- package/src/headers/14/js_native_api_v8.h +0 -301
- package/src/headers/14/js_native_api_v8_internals.h +0 -38
- package/src/headers/14/json_utils.h +0 -161
- package/src/headers/14/memory_tracker-inl.h +0 -355
- package/src/headers/14/module_wrap.h +0 -99
- package/src/headers/14/node.h +0 -1032
- package/src/headers/14/node_api.h +0 -255
- package/src/headers/14/node_api_types.h +0 -44
- package/src/headers/14/node_binding.h +0 -99
- package/src/headers/14/node_buffer.h +0 -92
- package/src/headers/14/node_constants.h +0 -84
- package/src/headers/14/node_context_data.h +0 -44
- package/src/headers/14/node_contextify.h +0 -161
- package/src/headers/14/node_crypto.h +0 -865
- package/src/headers/14/node_crypto_bio.h +0 -195
- package/src/headers/14/node_crypto_clienthello-inl.h +0 -91
- package/src/headers/14/node_crypto_clienthello.h +0 -132
- package/src/headers/14/node_crypto_common.h +0 -138
- package/src/headers/14/node_crypto_groups.h +0 -415
- package/src/headers/14/node_dtrace.h +0 -86
- package/src/headers/14/node_errors.h +0 -214
- package/src/headers/14/node_file-inl.h +0 -306
- package/src/headers/14/node_file.h +0 -417
- package/src/headers/14/node_http2.h +0 -1191
- package/src/headers/14/node_http2_state.h +0 -149
- package/src/headers/14/node_http_common-inl.h +0 -194
- package/src/headers/14/node_http_common.h +0 -529
- package/src/headers/14/node_i18n.h +0 -144
- package/src/headers/14/node_internals.h +0 -405
- package/src/headers/14/node_main_instance.h +0 -96
- package/src/headers/14/node_mem.h +0 -45
- package/src/headers/14/node_messaging.h +0 -303
- package/src/headers/14/node_metadata.h +0 -109
- package/src/headers/14/node_mutex.h +0 -247
- package/src/headers/14/node_native_module.h +0 -101
- package/src/headers/14/node_native_module_env.h +0 -66
- package/src/headers/14/node_options-inl.h +0 -451
- package/src/headers/14/node_options.h +0 -481
- package/src/headers/14/node_perf.h +0 -181
- package/src/headers/14/node_perf_common.h +0 -97
- package/src/headers/14/node_platform.h +0 -189
- package/src/headers/14/node_process.h +0 -40
- package/src/headers/14/node_report.h +0 -47
- package/src/headers/14/node_revert.h +0 -72
- package/src/headers/14/node_root_certs.h +0 -3458
- package/src/headers/14/node_sockaddr-inl.h +0 -170
- package/src/headers/14/node_sockaddr.h +0 -123
- package/src/headers/14/node_stat_watcher.h +0 -70
- package/src/headers/14/node_union_bytes.h +0 -103
- package/src/headers/14/node_url.h +0 -188
- package/src/headers/14/node_version.h +0 -98
- package/src/headers/14/node_wasi.h +0 -108
- package/src/headers/14/node_win32_etw_provider-inl.h +0 -287
- package/src/headers/14/node_win32_etw_provider.h +0 -99
- package/src/headers/14/node_worker.h +0 -141
- package/src/headers/14/pipe_wrap.h +0 -78
- package/src/headers/14/req_wrap-inl.h +0 -170
- package/src/headers/14/req_wrap.h +0 -77
- package/src/headers/14/stream_base-inl.h +0 -275
- package/src/headers/14/stream_base.h +0 -434
- package/src/headers/14/stream_pipe.h +0 -73
- package/src/headers/14/stream_wrap.h +0 -130
- package/src/headers/14/string_bytes.h +0 -129
- package/src/headers/14/string_decoder.h +0 -50
- package/src/headers/14/string_search.h +0 -638
- package/src/headers/14/tcp_wrap.h +0 -101
- package/src/headers/14/threadpoolwork-inl.h +0 -57
- package/src/headers/14/tls_wrap.h +0 -222
- package/src/headers/14/tracing/agent.h +0 -195
- package/src/headers/14/tracing/node_trace_buffer.h +0 -83
- package/src/headers/14/tracing/node_trace_writer.h +0 -75
- package/src/headers/14/tracing/trace_event.h +0 -720
- package/src/headers/14/tracing/traced_value.h +0 -70
- package/src/headers/14/tty_wrap.h +0 -64
- package/src/headers/14/udp_wrap.h +0 -227
- package/src/headers/14/util-inl.h +0 -566
- package/src/headers/14/util.h +0 -804
- package/src/headers/14/v8abbr.h +0 -124
- package/src/headers/16/aliased_buffer.h +0 -315
- package/src/headers/16/aliased_struct-inl.h +0 -54
- package/src/headers/16/aliased_struct.h +0 -63
- package/src/headers/16/allocated_buffer-inl.h +0 -110
- package/src/headers/16/allocated_buffer.h +0 -73
- package/src/headers/16/async_wrap-inl.h +0 -94
- package/src/headers/16/async_wrap.h +0 -246
- package/src/headers/16/base64-inl.h +0 -189
- package/src/headers/16/base64.h +0 -69
- package/src/headers/16/base_object.h +0 -294
- package/src/headers/16/connect_wrap.h +0 -26
- package/src/headers/16/connection_wrap.h +0 -30
- package/src/headers/16/crypto/crypto_aes.h +0 -89
- package/src/headers/16/crypto/crypto_bio.h +0 -194
- package/src/headers/16/crypto/crypto_cipher.h +0 -286
- package/src/headers/16/crypto/crypto_clienthello-inl.h +0 -90
- package/src/headers/16/crypto/crypto_clienthello.h +0 -131
- package/src/headers/16/crypto/crypto_common.h +0 -187
- package/src/headers/16/crypto/crypto_context.h +0 -147
- package/src/headers/16/crypto/crypto_dh.h +0 -157
- package/src/headers/16/crypto/crypto_dsa.h +0 -76
- package/src/headers/16/crypto/crypto_ec.h +0 -169
- package/src/headers/16/crypto/crypto_groups.h +0 -415
- package/src/headers/16/crypto/crypto_hash.h +0 -89
- package/src/headers/16/crypto/crypto_hkdf.h +0 -66
- package/src/headers/16/crypto/crypto_hmac.h +0 -94
- package/src/headers/16/crypto/crypto_keygen.h +0 -301
- package/src/headers/16/crypto/crypto_keys.h +0 -412
- package/src/headers/16/crypto/crypto_pbkdf2.h +0 -76
- package/src/headers/16/crypto/crypto_random.h +0 -130
- package/src/headers/16/crypto/crypto_rsa.h +0 -141
- package/src/headers/16/crypto/crypto_scrypt.h +0 -87
- package/src/headers/16/crypto/crypto_sig.h +0 -167
- package/src/headers/16/crypto/crypto_spkac.h +0 -20
- package/src/headers/16/crypto/crypto_timing.h +0 -20
- package/src/headers/16/crypto/crypto_tls.h +0 -292
- package/src/headers/16/crypto/crypto_util.h +0 -736
- package/src/headers/16/crypto/crypto_x509.h +0 -141
- package/src/headers/16/debug_utils.h +0 -184
- package/src/headers/16/diagnosticfilename-inl.h +0 -33
- package/src/headers/16/env-inl.h +0 -1277
- package/src/headers/16/env.h +0 -1629
- package/src/headers/16/handle_wrap.h +0 -121
- package/src/headers/16/histogram-inl.h +0 -88
- package/src/headers/16/histogram.h +0 -216
- package/src/headers/16/inspector_io.h +0 -78
- package/src/headers/16/inspector_socket.h +0 -60
- package/src/headers/16/inspector_socket_server.h +0 -110
- package/src/headers/16/js_native_api.h +0 -561
- package/src/headers/16/js_native_api_types.h +0 -160
- package/src/headers/16/js_native_api_v8.h +0 -451
- package/src/headers/16/js_native_api_v8_internals.h +0 -39
- package/src/headers/16/js_stream.h +0 -52
- package/src/headers/16/memory_tracker-inl.h +0 -356
- package/src/headers/16/memory_tracker.h +0 -284
- package/src/headers/16/node.d +0 -315
- package/src/headers/16/node.h +0 -1132
- package/src/headers/16/node.stp +0 -146
- package/src/headers/16/node_api.h +0 -275
- package/src/headers/16/node_api_internals.h +0 -30
- package/src/headers/16/node_api_types.h +0 -50
- package/src/headers/16/node_binding.h +0 -99
- package/src/headers/16/node_blob.h +0 -191
- package/src/headers/16/node_bob-inl.h +0 -37
- package/src/headers/16/node_bob.h +0 -111
- package/src/headers/16/node_buffer.h +0 -92
- package/src/headers/16/node_constants.h +0 -84
- package/src/headers/16/node_context_data.h +0 -44
- package/src/headers/16/node_contextify.h +0 -196
- package/src/headers/16/node_dir.h +0 -52
- package/src/headers/16/node_dtrace.h +0 -86
- package/src/headers/16/node_errors.h +0 -277
- package/src/headers/16/node_external_reference.h +0 -129
- package/src/headers/16/node_file-inl.h +0 -306
- package/src/headers/16/node_http2.h +0 -1140
- package/src/headers/16/node_http_common-inl.h +0 -200
- package/src/headers/16/node_http_common.h +0 -531
- package/src/headers/16/node_internals.h +0 -421
- package/src/headers/16/node_main_instance.h +0 -103
- package/src/headers/16/node_mem-inl.h +0 -112
- package/src/headers/16/node_messaging.h +0 -373
- package/src/headers/16/node_metadata.h +0 -122
- package/src/headers/16/node_native_module.h +0 -101
- package/src/headers/16/node_native_module_env.h +0 -68
- package/src/headers/16/node_object_wrap.h +0 -132
- package/src/headers/16/node_options-inl.h +0 -477
- package/src/headers/16/node_options.h +0 -494
- package/src/headers/16/node_perf.h +0 -185
- package/src/headers/16/node_perf_common.h +0 -89
- package/src/headers/16/node_platform.h +0 -192
- package/src/headers/16/node_process.h +0 -43
- package/src/headers/16/node_provider.d +0 -80
- package/src/headers/16/node_snapshotable.h +0 -137
- package/src/headers/16/node_sockaddr-inl.h +0 -266
- package/src/headers/16/node_sockaddr.h +0 -405
- package/src/headers/16/node_union_bytes.h +0 -103
- package/src/headers/16/node_url.h +0 -205
- package/src/headers/16/node_v8.h +0 -41
- package/src/headers/16/node_v8_platform-inl.h +0 -194
- package/src/headers/16/node_version.h +0 -98
- package/src/headers/16/node_wasi.h +0 -108
- package/src/headers/16/node_watchdog.h +0 -152
- package/src/headers/16/node_win32_etw_provider-inl.h +0 -288
- package/src/headers/16/node_win32_etw_provider.h +0 -99
- package/src/headers/16/node_worker.h +0 -145
- package/src/headers/16/req_wrap.h +0 -77
- package/src/headers/16/spawn_sync.h +0 -242
- package/src/headers/16/stream_base-inl.h +0 -303
- package/src/headers/16/stream_base.h +0 -454
- package/src/headers/16/stream_pipe.h +0 -73
- package/src/headers/16/string_bytes.h +0 -122
- package/src/headers/16/string_decoder-inl.h +0 -37
- package/src/headers/16/string_search.h +0 -638
- package/src/headers/16/tcp_wrap.h +0 -103
- package/src/headers/16/threadpoolwork-inl.h +0 -57
- package/src/headers/16/timer_wrap.h +0 -84
- package/src/headers/16/tracing/agent.h +0 -195
- package/src/headers/16/tracing/node_trace_buffer.h +0 -83
- package/src/headers/16/tracing/node_trace_writer.h +0 -75
- package/src/headers/16/tracing/trace_event.h +0 -720
- package/src/headers/16/tracing/trace_event_common.h +0 -1109
- package/src/headers/16/tracing/traced_value.h +0 -70
- package/src/headers/16/tty_wrap.h +0 -66
- package/src/headers/16/util-inl.h +0 -575
- package/src/headers/16/util.h +0 -824
- package/src/headers/16/v8abbr.h +0 -123
- package/src/headers/16/v8ustack.d +0 -695
- package/src/headers/18/aliased_buffer.h +0 -315
- package/src/headers/18/aliased_struct-inl.h +0 -54
- package/src/headers/18/aliased_struct.h +0 -63
- package/src/headers/18/base64-inl.h +0 -189
- package/src/headers/18/base64.h +0 -69
- package/src/headers/18/base_object-inl.h +0 -374
- package/src/headers/18/callback_queue-inl.h +0 -97
- package/src/headers/18/callback_queue.h +0 -78
- package/src/headers/18/cares_wrap.h +0 -523
- package/src/headers/18/connect_wrap.h +0 -26
- package/src/headers/18/connection_wrap.h +0 -30
- package/src/headers/18/crypto/crypto_aes.h +0 -89
- package/src/headers/18/crypto/crypto_bio.h +0 -194
- package/src/headers/18/crypto/crypto_cipher.h +0 -291
- package/src/headers/18/crypto/crypto_clienthello-inl.h +0 -90
- package/src/headers/18/crypto/crypto_common.h +0 -151
- package/src/headers/18/crypto/crypto_dh.h +0 -156
- package/src/headers/18/crypto/crypto_dsa.h +0 -77
- package/src/headers/18/crypto/crypto_ec.h +0 -170
- package/src/headers/18/crypto/crypto_groups.h +0 -415
- package/src/headers/18/crypto/crypto_hash.h +0 -89
- package/src/headers/18/crypto/crypto_hkdf.h +0 -65
- package/src/headers/18/crypto/crypto_hmac.h +0 -94
- package/src/headers/18/crypto/crypto_keygen.h +0 -305
- package/src/headers/18/crypto/crypto_pbkdf2.h +0 -76
- package/src/headers/18/crypto/crypto_random.h +0 -130
- package/src/headers/18/crypto/crypto_rsa.h +0 -141
- package/src/headers/18/crypto/crypto_scrypt.h +0 -87
- package/src/headers/18/crypto/crypto_sig.h +0 -168
- package/src/headers/18/crypto/crypto_spkac.h +0 -21
- package/src/headers/18/crypto/crypto_timing.h +0 -20
- package/src/headers/18/crypto/crypto_x509.h +0 -143
- package/src/headers/18/debug_utils-inl.h +0 -223
- package/src/headers/18/diagnosticfilename-inl.h +0 -33
- package/src/headers/18/env-inl.h +0 -1308
- package/src/headers/18/env.h +0 -1667
- package/src/headers/18/inspector_agent.h +0 -144
- package/src/headers/18/inspector_io.h +0 -78
- package/src/headers/18/inspector_profiler.h +0 -149
- package/src/headers/18/inspector_socket.h +0 -60
- package/src/headers/18/inspector_socket_server.h +0 -110
- package/src/headers/18/js_stream.h +0 -52
- package/src/headers/18/json_utils.h +0 -161
- package/src/headers/18/memory_tracker.h +0 -284
- package/src/headers/18/module_wrap.h +0 -116
- package/src/headers/18/node_binding.h +0 -99
- package/src/headers/18/node_context_data.h +0 -44
- package/src/headers/18/node_contextify.h +0 -196
- package/src/headers/18/node_crypto.h +0 -57
- package/src/headers/18/node_dir.h +0 -52
- package/src/headers/18/node_dtrace.h +0 -86
- package/src/headers/18/node_external_reference.h +0 -145
- package/src/headers/18/node_file.h +0 -426
- package/src/headers/18/node_http2_state.h +0 -149
- package/src/headers/18/node_i18n.h +0 -145
- package/src/headers/18/node_mem-inl.h +0 -112
- package/src/headers/18/node_mem.h +0 -45
- package/src/headers/18/node_mutex.h +0 -323
- package/src/headers/18/node_native_module.h +0 -109
- package/src/headers/18/node_native_module_env.h +0 -71
- package/src/headers/18/node_object_wrap.h +0 -132
- package/src/headers/18/node_process-inl.h +0 -26
- package/src/headers/18/node_report.h +0 -47
- package/src/headers/18/node_revert.h +0 -82
- package/src/headers/18/node_root_certs.h +0 -3246
- package/src/headers/18/node_snapshot_builder.h +0 -43
- package/src/headers/18/node_snapshotable.h +0 -130
- package/src/headers/18/node_stat_watcher.h +0 -72
- package/src/headers/18/node_union_bytes.h +0 -103
- package/src/headers/18/node_url.h +0 -205
- package/src/headers/18/node_v8.h +0 -41
- package/src/headers/18/node_v8_platform-inl.h +0 -194
- package/src/headers/18/node_wasi.h +0 -108
- package/src/headers/18/node_watchdog.h +0 -152
- package/src/headers/18/node_win32_etw_provider-inl.h +0 -288
- package/src/headers/18/node_win32_etw_provider.h +0 -99
- package/src/headers/18/pipe_wrap.h +0 -80
- package/src/headers/18/req_wrap-inl.h +0 -170
- package/src/headers/18/spawn_sync.h +0 -242
- package/src/headers/18/stream_wrap.h +0 -133
- package/src/headers/18/string_decoder-inl.h +0 -37
- package/src/headers/18/string_decoder.h +0 -50
- package/src/headers/18/string_search.h +0 -638
- package/src/headers/18/tracing/node_trace_buffer.h +0 -83
- package/src/headers/18/tracing/node_trace_writer.h +0 -75
- package/src/headers/18/tracing/trace_event_common.h +0 -1109
- package/src/headers/18/tracing/traced_value.h +0 -70
- package/src/headers/18/udp_wrap.h +0 -227
- package/src/headers/18/v8abbr.h +0 -123
- /package/src/headers/{14 → 22}/aliased_struct-inl.h +0 -0
- /package/src/headers/{14 → 22}/aliased_struct.h +0 -0
- /package/src/headers/{16 → 22}/callback_queue-inl.h +0 -0
- /package/src/headers/{14 → 22}/connect_wrap.h +0 -0
- /package/src/headers/{14 → 22}/connection_wrap.h +0 -0
- /package/src/headers/{14 → 22}/diagnosticfilename-inl.h +0 -0
- /package/src/headers/{18 → 22}/histogram-inl.h +0 -0
- /package/src/headers/{14 → 22}/inspector_io.h +0 -0
- /package/src/headers/{14 → 22}/inspector_socket.h +0 -0
- /package/src/headers/{14 → 22}/inspector_socket_server.h +0 -0
- /package/src/headers/{14 → 22}/js_stream.h +0 -0
- /package/src/headers/{14 → 22}/node_dir.h +0 -0
- /package/src/headers/{14 → 22}/node_mem-inl.h +0 -0
- /package/src/headers/{16 → 22}/node_mem.h +0 -0
- /package/src/headers/{16 → 22}/node_mutex.h +0 -0
- /package/src/headers/{14 → 22}/node_object_wrap.h +0 -0
- /package/src/headers/{16 → 22}/node_process-inl.h +0 -0
- /package/src/headers/{18 → 22}/node_sockaddr-inl.h +0 -0
- /package/src/headers/{18 → 22}/node_wasm_web_api.h +0 -0
- /package/src/headers/{16 → 22}/pipe_wrap.h +0 -0
- /package/src/headers/{18 → 22}/req_wrap.h +0 -0
- /package/src/headers/{18 → 22}/timer_wrap-inl.h +0 -0
- /package/src/headers/{18 → 22}/timer_wrap.h +0 -0
- /package/src/headers/{18 → 22}/tracing/agent.h +0 -0
- /package/src/headers/{14 → 22}/tracing/trace_event_common.h +0 -0
- /package/src/headers/{18 → 22}/tty_wrap.h +0 -0
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
#ifndef SRC_STREAM_PIPE_H_
|
|
2
|
-
#define SRC_STREAM_PIPE_H_
|
|
3
|
-
|
|
4
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
5
|
-
|
|
6
|
-
#include "stream_base.h"
|
|
7
|
-
#include "allocated_buffer.h"
|
|
8
|
-
|
|
9
|
-
namespace node {
|
|
10
|
-
|
|
11
|
-
class StreamPipe : public AsyncWrap {
|
|
12
|
-
public:
|
|
13
|
-
StreamPipe(StreamBase* source, StreamBase* sink, v8::Local<v8::Object> obj);
|
|
14
|
-
~StreamPipe() override;
|
|
15
|
-
|
|
16
|
-
void Unpipe(bool is_in_deletion = false);
|
|
17
|
-
|
|
18
|
-
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
19
|
-
static void Start(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
20
|
-
static void Unpipe(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
21
|
-
static void IsClosed(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
22
|
-
static void PendingWrites(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
23
|
-
|
|
24
|
-
SET_NO_MEMORY_INFO()
|
|
25
|
-
SET_MEMORY_INFO_NAME(StreamPipe)
|
|
26
|
-
SET_SELF_SIZE(StreamPipe)
|
|
27
|
-
|
|
28
|
-
private:
|
|
29
|
-
inline StreamBase* source();
|
|
30
|
-
inline StreamBase* sink();
|
|
31
|
-
|
|
32
|
-
int pending_writes_ = 0;
|
|
33
|
-
bool is_reading_ = false;
|
|
34
|
-
bool is_eof_ = false;
|
|
35
|
-
bool is_closed_ = true;
|
|
36
|
-
bool sink_destroyed_ = false;
|
|
37
|
-
bool source_destroyed_ = false;
|
|
38
|
-
bool uses_wants_write_ = false;
|
|
39
|
-
|
|
40
|
-
// Set a default value so that when we’re coming from Start(), we know
|
|
41
|
-
// that we don’t want to read just yet.
|
|
42
|
-
// This will likely need to be changed when supporting streams without
|
|
43
|
-
// `OnStreamWantsWrite()` support.
|
|
44
|
-
size_t wanted_data_ = 0;
|
|
45
|
-
|
|
46
|
-
void ProcessData(size_t nread, AllocatedBuffer&& buf);
|
|
47
|
-
|
|
48
|
-
class ReadableListener : public StreamListener {
|
|
49
|
-
public:
|
|
50
|
-
uv_buf_t OnStreamAlloc(size_t suggested_size) override;
|
|
51
|
-
void OnStreamRead(ssize_t nread, const uv_buf_t& buf) override;
|
|
52
|
-
void OnStreamDestroy() override;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
class WritableListener : public StreamListener {
|
|
56
|
-
public:
|
|
57
|
-
uv_buf_t OnStreamAlloc(size_t suggested_size) override;
|
|
58
|
-
void OnStreamRead(ssize_t nread, const uv_buf_t& buf) override;
|
|
59
|
-
void OnStreamAfterWrite(WriteWrap* w, int status) override;
|
|
60
|
-
void OnStreamAfterShutdown(ShutdownWrap* w, int status) override;
|
|
61
|
-
void OnStreamWantsWrite(size_t suggested_size) override;
|
|
62
|
-
void OnStreamDestroy() override;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
ReadableListener readable_listener_;
|
|
66
|
-
WritableListener writable_listener_;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
} // namespace node
|
|
70
|
-
|
|
71
|
-
#endif
|
|
72
|
-
|
|
73
|
-
#endif // SRC_STREAM_PIPE_H_
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
-
//
|
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
-
// copy of this software and associated documentation files (the
|
|
5
|
-
// "Software"), to deal in the Software without restriction, including
|
|
6
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
-
// following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included
|
|
12
|
-
// in all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
-
|
|
22
|
-
#ifndef SRC_STREAM_WRAP_H_
|
|
23
|
-
#define SRC_STREAM_WRAP_H_
|
|
24
|
-
|
|
25
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
26
|
-
|
|
27
|
-
#include "stream_base.h"
|
|
28
|
-
#include "handle_wrap.h"
|
|
29
|
-
#include "v8.h"
|
|
30
|
-
|
|
31
|
-
namespace node {
|
|
32
|
-
|
|
33
|
-
class Environment;
|
|
34
|
-
|
|
35
|
-
class LibuvStreamWrap : public HandleWrap, public StreamBase {
|
|
36
|
-
public:
|
|
37
|
-
static void Initialize(v8::Local<v8::Object> target,
|
|
38
|
-
v8::Local<v8::Value> unused,
|
|
39
|
-
v8::Local<v8::Context> context,
|
|
40
|
-
void* priv);
|
|
41
|
-
|
|
42
|
-
int GetFD() override;
|
|
43
|
-
bool IsAlive() override;
|
|
44
|
-
bool IsClosing() override;
|
|
45
|
-
bool IsIPCPipe() override;
|
|
46
|
-
|
|
47
|
-
// JavaScript functions
|
|
48
|
-
int ReadStart() override;
|
|
49
|
-
int ReadStop() override;
|
|
50
|
-
|
|
51
|
-
// Resource implementation
|
|
52
|
-
int DoShutdown(ShutdownWrap* req_wrap) override;
|
|
53
|
-
int DoTryWrite(uv_buf_t** bufs, size_t* count) override;
|
|
54
|
-
int DoWrite(WriteWrap* w,
|
|
55
|
-
uv_buf_t* bufs,
|
|
56
|
-
size_t count,
|
|
57
|
-
uv_stream_t* send_handle) override;
|
|
58
|
-
|
|
59
|
-
inline uv_stream_t* stream() const {
|
|
60
|
-
return stream_;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
inline bool is_named_pipe() const {
|
|
64
|
-
return stream()->type == UV_NAMED_PIPE;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
inline bool is_named_pipe_ipc() const {
|
|
68
|
-
return is_named_pipe() &&
|
|
69
|
-
reinterpret_cast<const uv_pipe_t*>(stream())->ipc != 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
inline bool is_tcp() const {
|
|
73
|
-
return stream()->type == UV_TCP;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
ShutdownWrap* CreateShutdownWrap(v8::Local<v8::Object> object) override;
|
|
77
|
-
WriteWrap* CreateWriteWrap(v8::Local<v8::Object> object) override;
|
|
78
|
-
|
|
79
|
-
static LibuvStreamWrap* From(Environment* env, v8::Local<v8::Object> object);
|
|
80
|
-
|
|
81
|
-
protected:
|
|
82
|
-
LibuvStreamWrap(Environment* env,
|
|
83
|
-
v8::Local<v8::Object> object,
|
|
84
|
-
uv_stream_t* stream,
|
|
85
|
-
AsyncWrap::ProviderType provider);
|
|
86
|
-
|
|
87
|
-
AsyncWrap* GetAsyncWrap() override;
|
|
88
|
-
|
|
89
|
-
static v8::Local<v8::FunctionTemplate> GetConstructorTemplate(
|
|
90
|
-
Environment* env);
|
|
91
|
-
|
|
92
|
-
protected:
|
|
93
|
-
inline void set_fd(int fd) {
|
|
94
|
-
#ifdef _WIN32
|
|
95
|
-
fd_ = fd;
|
|
96
|
-
#endif
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
private:
|
|
101
|
-
static void GetWriteQueueSize(
|
|
102
|
-
const v8::FunctionCallbackInfo<v8::Value>& info);
|
|
103
|
-
static void SetBlocking(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
104
|
-
|
|
105
|
-
// Callbacks for libuv
|
|
106
|
-
void OnUvAlloc(size_t suggested_size, uv_buf_t* buf);
|
|
107
|
-
void OnUvRead(ssize_t nread, const uv_buf_t* buf);
|
|
108
|
-
|
|
109
|
-
static void AfterUvWrite(uv_write_t* req, int status);
|
|
110
|
-
static void AfterUvShutdown(uv_shutdown_t* req, int status);
|
|
111
|
-
|
|
112
|
-
uv_stream_t* const stream_;
|
|
113
|
-
|
|
114
|
-
#ifdef _WIN32
|
|
115
|
-
// We don't always have an FD that we could look up on the stream_
|
|
116
|
-
// object itself on Windows. However, for some cases, we open handles
|
|
117
|
-
// using FDs; In that case, we can store and provide the value.
|
|
118
|
-
// This became necessary because it allows to detect situations
|
|
119
|
-
// where multiple handles refer to the same stdio FDs (in particular,
|
|
120
|
-
// a possible IPC channel and a regular process.std??? stream).
|
|
121
|
-
int fd_ = -1;
|
|
122
|
-
#endif
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} // namespace node
|
|
127
|
-
|
|
128
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
129
|
-
|
|
130
|
-
#endif // SRC_STREAM_WRAP_H_
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
// Copyright Joyent, Inc. and other Node contributors.
|
|
2
|
-
//
|
|
3
|
-
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
4
|
-
// copy of this software and associated documentation files (the
|
|
5
|
-
// "Software"), to deal in the Software without restriction, including
|
|
6
|
-
// without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
8
|
-
// persons to whom the Software is furnished to do so, subject to the
|
|
9
|
-
// following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included
|
|
12
|
-
// in all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
15
|
-
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
17
|
-
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
18
|
-
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
19
|
-
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
20
|
-
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
21
|
-
|
|
22
|
-
#ifndef SRC_STRING_BYTES_H_
|
|
23
|
-
#define SRC_STRING_BYTES_H_
|
|
24
|
-
|
|
25
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
26
|
-
|
|
27
|
-
// Decodes a v8::Local<v8::String> or Buffer to a raw char*
|
|
28
|
-
|
|
29
|
-
#if (__GNUC__ >= 8) && !defined(__clang__)
|
|
30
|
-
#pragma GCC diagnostic push
|
|
31
|
-
#pragma GCC diagnostic ignored "-Wcast-function-type"
|
|
32
|
-
#endif
|
|
33
|
-
#include "v8.h"
|
|
34
|
-
#if (__GNUC__ >= 8) && !defined(__clang__)
|
|
35
|
-
#pragma GCC diagnostic pop
|
|
36
|
-
#endif
|
|
37
|
-
#include "env-inl.h"
|
|
38
|
-
|
|
39
|
-
#include <string>
|
|
40
|
-
|
|
41
|
-
namespace node {
|
|
42
|
-
|
|
43
|
-
class StringBytes {
|
|
44
|
-
public:
|
|
45
|
-
class InlineDecoder : public MaybeStackBuffer<char> {
|
|
46
|
-
public:
|
|
47
|
-
inline v8::Maybe<bool> Decode(Environment* env,
|
|
48
|
-
v8::Local<v8::String> string,
|
|
49
|
-
enum encoding enc) {
|
|
50
|
-
size_t storage;
|
|
51
|
-
if (!StringBytes::StorageSize(env->isolate(), string, enc).To(&storage))
|
|
52
|
-
return v8::Nothing<bool>();
|
|
53
|
-
AllocateSufficientStorage(storage);
|
|
54
|
-
const size_t length =
|
|
55
|
-
StringBytes::Write(env->isolate(), out(), storage, string, enc);
|
|
56
|
-
|
|
57
|
-
// No zero terminator is included when using this method.
|
|
58
|
-
SetLength(length);
|
|
59
|
-
return v8::Just(true);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
inline size_t size() const { return length(); }
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
// Fast, but can be 2 bytes oversized for Base64, and
|
|
66
|
-
// as much as triple UTF-8 strings <= 65536 chars in length
|
|
67
|
-
static v8::Maybe<size_t> StorageSize(v8::Isolate* isolate,
|
|
68
|
-
v8::Local<v8::Value> val,
|
|
69
|
-
enum encoding enc);
|
|
70
|
-
|
|
71
|
-
// Precise byte count, but slightly slower for Base64 and
|
|
72
|
-
// very much slower for UTF-8
|
|
73
|
-
static v8::Maybe<size_t> Size(v8::Isolate* isolate,
|
|
74
|
-
v8::Local<v8::Value> val,
|
|
75
|
-
enum encoding enc);
|
|
76
|
-
|
|
77
|
-
// Write the bytes from the string or buffer into the char*
|
|
78
|
-
// returns the number of bytes written, which will always be
|
|
79
|
-
// <= buflen. Use StorageSize/Size first to know how much
|
|
80
|
-
// memory to allocate.
|
|
81
|
-
static size_t Write(v8::Isolate* isolate,
|
|
82
|
-
char* buf,
|
|
83
|
-
size_t buflen,
|
|
84
|
-
v8::Local<v8::Value> val,
|
|
85
|
-
enum encoding enc,
|
|
86
|
-
int* chars_written = nullptr);
|
|
87
|
-
|
|
88
|
-
// Take the bytes in the src, and turn it into a Buffer or String.
|
|
89
|
-
static v8::MaybeLocal<v8::Value> Encode(v8::Isolate* isolate,
|
|
90
|
-
const char* buf,
|
|
91
|
-
size_t buflen,
|
|
92
|
-
enum encoding encoding,
|
|
93
|
-
v8::Local<v8::Value>* error);
|
|
94
|
-
|
|
95
|
-
// Warning: This reverses endianness on BE platforms, even though the
|
|
96
|
-
// signature using uint16_t implies that it should not.
|
|
97
|
-
// However, the brokenness is already public API and can't therefore
|
|
98
|
-
// be changed easily.
|
|
99
|
-
static v8::MaybeLocal<v8::Value> Encode(v8::Isolate* isolate,
|
|
100
|
-
const uint16_t* buf,
|
|
101
|
-
size_t buflen,
|
|
102
|
-
v8::Local<v8::Value>* error);
|
|
103
|
-
|
|
104
|
-
static v8::MaybeLocal<v8::Value> Encode(v8::Isolate* isolate,
|
|
105
|
-
const char* buf,
|
|
106
|
-
enum encoding encoding,
|
|
107
|
-
v8::Local<v8::Value>* error);
|
|
108
|
-
|
|
109
|
-
static size_t hex_encode(const char* src,
|
|
110
|
-
size_t slen,
|
|
111
|
-
char* dst,
|
|
112
|
-
size_t dlen);
|
|
113
|
-
|
|
114
|
-
static std::string hex_encode(const char* src, size_t slen);
|
|
115
|
-
|
|
116
|
-
private:
|
|
117
|
-
static size_t WriteUCS2(v8::Isolate* isolate,
|
|
118
|
-
char* buf,
|
|
119
|
-
size_t buflen,
|
|
120
|
-
v8::Local<v8::String> str,
|
|
121
|
-
int flags,
|
|
122
|
-
size_t* chars_written);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
} // namespace node
|
|
126
|
-
|
|
127
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
128
|
-
|
|
129
|
-
#endif // SRC_STRING_BYTES_H_
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
#ifndef SRC_STRING_DECODER_H_
|
|
2
|
-
#define SRC_STRING_DECODER_H_
|
|
3
|
-
|
|
4
|
-
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
5
|
-
|
|
6
|
-
#include "node.h"
|
|
7
|
-
|
|
8
|
-
namespace node {
|
|
9
|
-
|
|
10
|
-
class StringDecoder {
|
|
11
|
-
public:
|
|
12
|
-
StringDecoder() { state_[kEncodingField] = BUFFER; }
|
|
13
|
-
inline void SetEncoding(enum encoding encoding);
|
|
14
|
-
inline enum encoding Encoding() const;
|
|
15
|
-
|
|
16
|
-
inline char* IncompleteCharacterBuffer();
|
|
17
|
-
inline unsigned MissingBytes() const;
|
|
18
|
-
inline unsigned BufferedBytes() const;
|
|
19
|
-
|
|
20
|
-
// Decode a string from the specified encoding.
|
|
21
|
-
// The value pointed to by `nread` will be modified to reflect that
|
|
22
|
-
// less data may have been read because it ended on an incomplete character
|
|
23
|
-
// and more data may have been read because a previously incomplete character
|
|
24
|
-
// was finished.
|
|
25
|
-
v8::MaybeLocal<v8::String> DecodeData(v8::Isolate* isolate,
|
|
26
|
-
const char* data,
|
|
27
|
-
size_t* nread);
|
|
28
|
-
// Flush an incomplete character. For character encodings like UTF8 this
|
|
29
|
-
// means printing replacement characters, buf for e.g. Base64 the returned
|
|
30
|
-
// string contains more data.
|
|
31
|
-
v8::MaybeLocal<v8::String> FlushData(v8::Isolate* isolate);
|
|
32
|
-
|
|
33
|
-
enum Fields {
|
|
34
|
-
kIncompleteCharactersStart = 0,
|
|
35
|
-
kIncompleteCharactersEnd = 4,
|
|
36
|
-
kMissingBytes = 4,
|
|
37
|
-
kBufferedBytes = 5,
|
|
38
|
-
kEncodingField = 6,
|
|
39
|
-
kNumFields = 7
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
private:
|
|
43
|
-
uint8_t state_[kNumFields] = {};
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
} // namespace node
|
|
47
|
-
|
|
48
|
-
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
49
|
-
|
|
50
|
-
#endif // SRC_STRING_DECODER_H_
|