@evobug_com/safe-ts-feature-node 0.2.0 → 0.3.0
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/README.md +2 -2
- package/node-api.json +48 -85
- package/package.json +162 -3
- package/safe/buffer.d.ts +155 -0
- package/safe/buffer.js +582 -0
- package/safe/child_process.d.ts +32 -0
- package/safe/child_process.js +21 -0
- package/safe/core.d.ts +36 -0
- package/safe/core.js +25 -0
- package/safe/crypto.d.ts +105 -0
- package/safe/crypto.js +205 -0
- package/safe/dgram.d.ts +26 -0
- package/safe/dgram.js +76 -0
- package/safe/dns/promises.d.ts +136 -0
- package/safe/dns/promises.js +262 -0
- package/safe/errors.d.ts +155 -0
- package/safe/errors.js +32 -0
- package/safe/events.d.ts +11 -0
- package/safe/events.js +14 -0
- package/safe/ffi.d.ts +23 -0
- package/safe/ffi.js +57 -0
- package/safe/fs/promises.d.ts +168 -0
- package/safe/fs/promises.js +366 -0
- package/safe/fs.d.ts +201 -0
- package/safe/fs.js +422 -0
- package/safe/globals.d.ts +87 -0
- package/safe/globals.js +232 -0
- package/safe/http.d.ts +34 -0
- package/safe/http.js +85 -0
- package/safe/http2.d.ts +26 -0
- package/safe/http2.js +61 -0
- package/safe/https.d.ts +21 -0
- package/safe/https.js +29 -0
- package/safe/inspector/promises.d.ts +200 -0
- package/safe/inspector/promises.js +13 -0
- package/safe/inspector.d.ts +8 -0
- package/safe/inspector.js +13 -0
- package/safe/module.d.ts +21 -0
- package/safe/module.js +45 -0
- package/safe/net.d.ts +11 -0
- package/safe/net.js +17 -0
- package/safe/os.d.ts +20 -0
- package/safe/os.js +29 -0
- package/safe/perf_hooks.d.ts +11 -0
- package/safe/perf_hooks.js +12 -0
- package/safe/process.d.ts +31 -0
- package/safe/process.js +97 -0
- package/safe/punycode.d.ts +10 -0
- package/safe/punycode.js +21 -0
- package/safe/querystring.d.ts +11 -0
- package/safe/querystring.js +21 -0
- package/safe/readline/promises.d.ts +12 -0
- package/safe/readline/promises.js +13 -0
- package/safe/runtime.d.ts +10 -0
- package/safe/runtime.js +16 -0
- package/safe/sqlite.d.ts +54 -0
- package/safe/sqlite.js +118 -0
- package/safe/stream/consumers.d.ts +19 -0
- package/safe/stream/consumers.js +54 -0
- package/safe/stream/promises.d.ts +26 -0
- package/safe/stream/promises.js +22 -0
- package/safe/stream/web.d.ts +18 -0
- package/safe/stream/web.js +37 -0
- package/safe/stream.d.ts +29 -0
- package/safe/stream.js +62 -0
- package/safe/tls.d.ts +27 -0
- package/safe/tls.js +65 -0
- package/safe/url.d.ts +28 -0
- package/safe/url.js +57 -0
- package/safe/util.d.ts +13 -0
- package/safe/util.js +25 -0
- package/safe/v8.d.ts +28 -0
- package/safe/v8.js +85 -0
- package/safe/vm.d.ts +23 -0
- package/safe/vm.js +69 -0
- package/safe/wasi.d.ts +10 -0
- package/safe/wasi.js +20 -0
- package/safe/worker_threads.d.ts +31 -0
- package/safe/worker_threads.js +62 -0
- package/safe/zlib.d.ts +61 -0
- package/safe/zlib.js +214 -0
- package/safe-ts.json +1722 -490
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { NodeError } from "../errors.js";
|
|
5
|
+
import type * as $inspector from "inspector";
|
|
6
|
+
import type * as $inspectorPromises from "node:inspector/promises";
|
|
7
|
+
export * from "node:inspector/promises";
|
|
8
|
+
|
|
9
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
10
|
+
export declare function post(session: $inspectorPromises.Session, method: string, params?: object): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
11
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
12
|
+
export declare function post(session: $inspectorPromises.Session, method: "Schema.getDomains"): Promise<Result<$inspector.Schema.GetDomainsReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
13
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
14
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.evaluate", params?: $inspector.Runtime.EvaluateParameterType): Promise<Result<$inspector.Runtime.EvaluateReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
15
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
16
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.awaitPromise", params?: $inspector.Runtime.AwaitPromiseParameterType): Promise<Result<$inspector.Runtime.AwaitPromiseReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
17
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
18
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.callFunctionOn", params?: $inspector.Runtime.CallFunctionOnParameterType): Promise<Result<$inspector.Runtime.CallFunctionOnReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
19
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
20
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.getProperties", params?: $inspector.Runtime.GetPropertiesParameterType): Promise<Result<$inspector.Runtime.GetPropertiesReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
21
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
22
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.releaseObject", params?: $inspector.Runtime.ReleaseObjectParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
23
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
24
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.releaseObjectGroup", params?: $inspector.Runtime.ReleaseObjectGroupParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
25
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
26
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.runIfWaitingForDebugger"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
27
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
28
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.enable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
29
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
30
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
31
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
32
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.discardConsoleEntries"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
33
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
34
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.setCustomObjectFormatterEnabled", params?: $inspector.Runtime.SetCustomObjectFormatterEnabledParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
35
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
36
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.compileScript", params?: $inspector.Runtime.CompileScriptParameterType): Promise<Result<$inspector.Runtime.CompileScriptReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
37
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
38
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.runScript", params?: $inspector.Runtime.RunScriptParameterType): Promise<Result<$inspector.Runtime.RunScriptReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
39
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
40
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.queryObjects", params?: $inspector.Runtime.QueryObjectsParameterType): Promise<Result<$inspector.Runtime.QueryObjectsReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
41
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
42
|
+
export declare function post(session: $inspectorPromises.Session, method: "Runtime.globalLexicalScopeNames", params?: $inspector.Runtime.GlobalLexicalScopeNamesParameterType): Promise<Result<$inspector.Runtime.GlobalLexicalScopeNamesReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
43
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
44
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.enable"): Promise<Result<$inspector.Debugger.EnableReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
45
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
46
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
47
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
48
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setBreakpointsActive", params?: $inspector.Debugger.SetBreakpointsActiveParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
49
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
50
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setSkipAllPauses", params?: $inspector.Debugger.SetSkipAllPausesParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
51
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
52
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setBreakpointByUrl", params?: $inspector.Debugger.SetBreakpointByUrlParameterType): Promise<Result<$inspector.Debugger.SetBreakpointByUrlReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
53
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
54
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setBreakpoint", params?: $inspector.Debugger.SetBreakpointParameterType): Promise<Result<$inspector.Debugger.SetBreakpointReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
55
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
56
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.removeBreakpoint", params?: $inspector.Debugger.RemoveBreakpointParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
57
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
58
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.getPossibleBreakpoints", params?: $inspector.Debugger.GetPossibleBreakpointsParameterType): Promise<Result<$inspector.Debugger.GetPossibleBreakpointsReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
59
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
60
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.continueToLocation", params?: $inspector.Debugger.ContinueToLocationParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
61
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
62
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.pauseOnAsyncCall", params?: $inspector.Debugger.PauseOnAsyncCallParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
63
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
64
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.stepOver"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
65
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
66
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.stepInto", params?: $inspector.Debugger.StepIntoParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
67
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
68
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.stepOut"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
69
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
70
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.pause"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
71
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
72
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.scheduleStepIntoAsync"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
73
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
74
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.resume"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
75
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
76
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.getStackTrace", params?: $inspector.Debugger.GetStackTraceParameterType): Promise<Result<$inspector.Debugger.GetStackTraceReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
77
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
78
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.searchInContent", params?: $inspector.Debugger.SearchInContentParameterType): Promise<Result<$inspector.Debugger.SearchInContentReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
79
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
80
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setScriptSource", params?: $inspector.Debugger.SetScriptSourceParameterType): Promise<Result<$inspector.Debugger.SetScriptSourceReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
81
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
82
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.restartFrame", params?: $inspector.Debugger.RestartFrameParameterType): Promise<Result<$inspector.Debugger.RestartFrameReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
83
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
84
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.getScriptSource", params?: $inspector.Debugger.GetScriptSourceParameterType): Promise<Result<$inspector.Debugger.GetScriptSourceReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
85
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
86
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setPauseOnExceptions", params?: $inspector.Debugger.SetPauseOnExceptionsParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
87
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
88
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.evaluateOnCallFrame", params?: $inspector.Debugger.EvaluateOnCallFrameParameterType): Promise<Result<$inspector.Debugger.EvaluateOnCallFrameReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
89
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
90
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setVariableValue", params?: $inspector.Debugger.SetVariableValueParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
91
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
92
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setReturnValue", params?: $inspector.Debugger.SetReturnValueParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
93
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
94
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setAsyncCallStackDepth", params?: $inspector.Debugger.SetAsyncCallStackDepthParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
95
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
96
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setBlackboxPatterns", params?: $inspector.Debugger.SetBlackboxPatternsParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
97
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
98
|
+
export declare function post(session: $inspectorPromises.Session, method: "Debugger.setBlackboxedRanges", params?: $inspector.Debugger.SetBlackboxedRangesParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
99
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
100
|
+
export declare function post(session: $inspectorPromises.Session, method: "Console.enable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
101
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
102
|
+
export declare function post(session: $inspectorPromises.Session, method: "Console.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
103
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
104
|
+
export declare function post(session: $inspectorPromises.Session, method: "Console.clearMessages"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
105
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
106
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.enable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
107
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
108
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
109
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
110
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.setSamplingInterval", params?: $inspector.Profiler.SetSamplingIntervalParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
111
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
112
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.start"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
113
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
114
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.stop"): Promise<Result<$inspector.Profiler.StopReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
115
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
116
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.startPreciseCoverage", params?: $inspector.Profiler.StartPreciseCoverageParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
117
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
118
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.stopPreciseCoverage"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
119
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
120
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.takePreciseCoverage"): Promise<Result<$inspector.Profiler.TakePreciseCoverageReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
121
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
122
|
+
export declare function post(session: $inspectorPromises.Session, method: "Profiler.getBestEffortCoverage"): Promise<Result<$inspector.Profiler.GetBestEffortCoverageReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
123
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
124
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.enable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
125
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
126
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
127
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
128
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.startTrackingHeapObjects", params?: $inspector.HeapProfiler.StartTrackingHeapObjectsParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
129
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
130
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.stopTrackingHeapObjects", params?: $inspector.HeapProfiler.StopTrackingHeapObjectsParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
131
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
132
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.takeHeapSnapshot", params?: $inspector.HeapProfiler.TakeHeapSnapshotParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
133
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
134
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.collectGarbage"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
135
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
136
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.getObjectByHeapObjectId", params?: $inspector.HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise<Result<$inspector.HeapProfiler.GetObjectByHeapObjectIdReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
137
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
138
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.addInspectedHeapObject", params?: $inspector.HeapProfiler.AddInspectedHeapObjectParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
139
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
140
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.getHeapObjectId", params?: $inspector.HeapProfiler.GetHeapObjectIdParameterType): Promise<Result<$inspector.HeapProfiler.GetHeapObjectIdReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
141
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
142
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.startSampling", params?: $inspector.HeapProfiler.StartSamplingParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
143
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
144
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.stopSampling"): Promise<Result<$inspector.HeapProfiler.StopSamplingReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
145
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
146
|
+
export declare function post(session: $inspectorPromises.Session, method: "HeapProfiler.getSamplingProfile"): Promise<Result<$inspector.HeapProfiler.GetSamplingProfileReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
147
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
148
|
+
export declare function post(session: $inspectorPromises.Session, method: "IO.read", params?: $inspector.IO.ReadParameterType): Promise<Result<$inspector.IO.ReadReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
149
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
150
|
+
export declare function post(session: $inspectorPromises.Session, method: "IO.close", params?: $inspector.IO.CloseParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
151
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
152
|
+
export declare function post(session: $inspectorPromises.Session, method: "Network.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
153
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
154
|
+
export declare function post(session: $inspectorPromises.Session, method: "Network.enable", params?: $inspector.Network.EnableParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
155
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
156
|
+
export declare function post(session: $inspectorPromises.Session, method: "Network.getRequestPostData", params?: $inspector.Network.GetRequestPostDataParameterType): Promise<Result<$inspector.Network.GetRequestPostDataReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
157
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
158
|
+
export declare function post(session: $inspectorPromises.Session, method: "Network.getResponseBody", params?: $inspector.Network.GetResponseBodyParameterType): Promise<Result<$inspector.Network.GetResponseBodyReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
159
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
160
|
+
export declare function post(session: $inspectorPromises.Session, method: "Network.streamResourceContent", params?: $inspector.Network.StreamResourceContentParameterType): Promise<Result<$inspector.Network.StreamResourceContentReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
161
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
162
|
+
export declare function post(session: $inspectorPromises.Session, method: "Network.loadNetworkResource", params?: $inspector.Network.LoadNetworkResourceParameterType): Promise<Result<$inspector.Network.LoadNetworkResourceReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
163
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
164
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeRuntime.enable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
165
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
166
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeRuntime.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
167
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
168
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: $inspector.NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
169
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
170
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeTracing.getCategories"): Promise<Result<$inspector.NodeTracing.GetCategoriesReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
171
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
172
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeTracing.start", params?: $inspector.NodeTracing.StartParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
173
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
174
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeTracing.stop"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
175
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
176
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeWorker.sendMessageToWorker", params?: $inspector.NodeWorker.SendMessageToWorkerParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
177
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
178
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeWorker.enable", params?: $inspector.NodeWorker.EnableParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
179
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
180
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeWorker.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
181
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
182
|
+
export declare function post(session: $inspectorPromises.Session, method: "NodeWorker.detach", params?: $inspector.NodeWorker.DetachParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
183
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
184
|
+
export declare function post(session: $inspectorPromises.Session, method: "Target.getTargets"): Promise<Result<$inspector.Target.GetTargetsReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
185
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
186
|
+
export declare function post(session: $inspectorPromises.Session, method: "Target.setAutoAttach", params?: $inspector.Target.SetAutoAttachParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
187
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
188
|
+
export declare function post(session: $inspectorPromises.Session, method: "DOMStorage.clear", params?: $inspector.DOMStorage.ClearParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
189
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
190
|
+
export declare function post(session: $inspectorPromises.Session, method: "DOMStorage.disable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
191
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
192
|
+
export declare function post(session: $inspectorPromises.Session, method: "DOMStorage.enable"): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
193
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
194
|
+
export declare function post(session: $inspectorPromises.Session, method: "DOMStorage.getDOMStorageItems", params?: $inspector.DOMStorage.GetDOMStorageItemsParameterType): Promise<Result<$inspector.DOMStorage.GetDOMStorageItemsReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
195
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
196
|
+
export declare function post(session: $inspectorPromises.Session, method: "DOMStorage.removeDOMStorageItem", params?: $inspector.DOMStorage.RemoveDOMStorageItemParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
197
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
198
|
+
export declare function post(session: $inspectorPromises.Session, method: "DOMStorage.setDOMStorageItem", params?: $inspector.DOMStorage.SetDOMStorageItemParameterType): Promise<Result<void, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
199
|
+
/** `Session#post()` (node:inspector/promises), with what it rejects with returned as an `Err`: `Error [ERR_INSPECTOR_COMMAND]`. */
|
|
200
|
+
export declare function post(session: $inspectorPromises.Session, method: "Storage.getStorageKey", params?: $inspector.Storage.GetStorageKeyParameterType): Promise<Result<$inspector.Storage.GetStorageKeyReturnType, NodeError<"ERR_INSPECTOR_COMMAND">>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import { failed, ok } from "../runtime.js";
|
|
5
|
+
export * from "node:inspector/promises";
|
|
6
|
+
|
|
7
|
+
export function post(self, ...args) {
|
|
8
|
+
try {
|
|
9
|
+
return Promise.resolve(self.post(...args)).then(ok, failed);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return Promise.resolve(new Err(error));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { NodeError } from "./errors.js";
|
|
5
|
+
export * from "node:inspector";
|
|
6
|
+
|
|
7
|
+
/** `open()` (node:inspector), with what it throws returned as an `Err`: `Error [ERR_INSPECTOR_ALREADY_ACTIVATED | ERR_INSPECTOR_NOT_ACTIVE]`. */
|
|
8
|
+
export declare function open(port?: number, host?: string, wait?: boolean): Result<Disposable, NodeError<"ERR_INSPECTOR_ALREADY_ACTIVATED" | "ERR_INSPECTOR_NOT_ACTIVE">>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import * as $module from "node:inspector";
|
|
4
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
5
|
+
export * from "node:inspector";
|
|
6
|
+
|
|
7
|
+
export function open(...args) {
|
|
8
|
+
try {
|
|
9
|
+
return $module.open(...args);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return new Err(error);
|
|
12
|
+
}
|
|
13
|
+
}
|
package/safe/module.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { NodeError } from "./errors.js";
|
|
5
|
+
import type * as $module from "node:module";
|
|
6
|
+
import type * as $url from "node:url";
|
|
7
|
+
export { Module, SourceMap, builtinModules, constants, createRequire, enableCompileCache, findSourceMap, flushCompileCache, getCompileCacheDir, getSourceMapsSupport, isBuiltin, registerHooks, setSourceMapsSupport, syncBuiltinESMExports } from "node:module";
|
|
8
|
+
export type { EnableCompileCacheOptions, EnableCompileCacheResult, ImportAttributes, ImportPhase, InitializeHook, LoadFnOutput, LoadHook, LoadHookContext, LoadHookSync, ModuleFormat, ModuleHooks, ModuleSource, RegisterHooksOptions, RegisterOptions, ResolveFnOutput, ResolveHook, ResolveHookContext, ResolveHookSync, SetSourceMapsSupportOptions, SourceMapConstructorOptions, SourceMapPayload, SourceMapping, SourceMapsSupport, SourceOrigin, StripTypeScriptTypesOptions } from "node:module";
|
|
9
|
+
|
|
10
|
+
/** `findPackageJSON()` (node:module), with what it throws returned as an `Err`: `Error [ERR_MODULE_NOT_FOUND]`. */
|
|
11
|
+
export declare function findPackageJSON(specifier: string | $url.URL, base?: string | $url.URL): Result<string | undefined, NodeError<"ERR_MODULE_NOT_FOUND">>;
|
|
12
|
+
/** `register()` (node:module), with what it throws returned as an `Err`: `Error [ERR_MODULE_NOT_FOUND] | (what the hooks module throws)`. */
|
|
13
|
+
export declare function register<Data = any>(specifier: string | $url.URL, parentURL?: string | $url.URL, options?: $module.Module.RegisterOptions<Data>): Result<void, unknown>;
|
|
14
|
+
/** `register()` (node:module), with what it throws returned as an `Err`: `Error [ERR_MODULE_NOT_FOUND] | (what the hooks module throws)`. */
|
|
15
|
+
export declare function register<Data = any>(specifier: string | $url.URL, options?: $module.Module.RegisterOptions<Data>): Result<void, unknown>;
|
|
16
|
+
/** `Module#require()` (node:module), with what it throws returned as an `Err`: `Error [MODULE_NOT_FOUND] {requireStack} | (what the module throws)`. */
|
|
17
|
+
export declare function require(module: $module.Module, id: string): Result<any, unknown>;
|
|
18
|
+
/** `runMain()` (node:module), with what it throws returned as an `Err`: `(what the main module throws)`. */
|
|
19
|
+
export declare function runMain(main?: string): Result<void, unknown>;
|
|
20
|
+
/** `stripTypeScriptTypes()` (node:module), with what it throws returned as an `Err`: `SyntaxError [ERR_INVALID_TYPESCRIPT_SYNTAX | ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]`. */
|
|
21
|
+
export declare function stripTypeScriptTypes(code: string, options?: $module.Module.StripTypeScriptTypesOptions): Result<string, NodeError<"ERR_INVALID_TYPESCRIPT_SYNTAX" | "ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX", "SyntaxError">>;
|
package/safe/module.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import * as $module from "node:module";
|
|
4
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
5
|
+
export * from "node:module";
|
|
6
|
+
|
|
7
|
+
export function findPackageJSON(...args) {
|
|
8
|
+
try {
|
|
9
|
+
return $module.findPackageJSON(...args);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return new Err(error);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function register(...args) {
|
|
16
|
+
try {
|
|
17
|
+
return $module.register(...args);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
return new Err(error);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function require(self, ...args) {
|
|
24
|
+
try {
|
|
25
|
+
return self.require(...args);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
return new Err(error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function runMain(...args) {
|
|
32
|
+
try {
|
|
33
|
+
return $module.runMain(...args);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return new Err(error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function stripTypeScriptTypes(...args) {
|
|
40
|
+
try {
|
|
41
|
+
return $module.stripTypeScriptTypes(...args);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return new Err(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
package/safe/net.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Option, Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { SystemError } from "./errors.js";
|
|
5
|
+
import type * as $net from "node:net";
|
|
6
|
+
export * from "node:net";
|
|
7
|
+
|
|
8
|
+
/** `Server#address()` (node:net), with `null` returned as `undefined`. */
|
|
9
|
+
export declare function address(server: $net.Server): Option<$net.AddressInfo | string>;
|
|
10
|
+
/** `new BoundSocket()` (node:net), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'bind', address, port?}`. */
|
|
11
|
+
export declare function newBoundSocket(options?: $net.BoundSocketOptions): Result<$net.BoundSocket, SystemError<"bind", { address: string; port?: number }>>;
|
package/safe/net.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import * as $module from "node:net";
|
|
4
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
5
|
+
export * from "node:net";
|
|
6
|
+
|
|
7
|
+
export function address(self, ...args) {
|
|
8
|
+
return self.address(...args) ?? undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function newBoundSocket(...args) {
|
|
12
|
+
try {
|
|
13
|
+
return new $module.BoundSocket(...args);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
return new Err(error);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/safe/os.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { NodeError } from "./errors.js";
|
|
5
|
+
import type * as $buffer from "buffer";
|
|
6
|
+
import type * as $os from "node:os";
|
|
7
|
+
export * from "node:os";
|
|
8
|
+
|
|
9
|
+
/** `getPriority()` (node:os), with what it throws returned as an `Err`: `SystemError [ERR_SYSTEM_ERROR] {info, errno, syscall: 'uv_os_getpriority'}`. */
|
|
10
|
+
export declare function getPriority(pid?: number): Result<number, NodeError<"ERR_SYSTEM_ERROR", "SystemError", { info: { errno: number; code: string; message: string; syscall: string; path?: string; dest?: string }; errno: number; syscall: "uv_os_getpriority" }>>;
|
|
11
|
+
/** `setPriority()` (node:os), with what it throws returned as an `Err`: `SystemError [ERR_SYSTEM_ERROR] {info, errno, syscall: 'uv_os_setpriority'}`. */
|
|
12
|
+
export declare function setPriority(priority: number): Result<void, NodeError<"ERR_SYSTEM_ERROR", "SystemError", { info: { errno: number; code: string; message: string; syscall: string; path?: string; dest?: string }; errno: number; syscall: "uv_os_setpriority" }>>;
|
|
13
|
+
/** `setPriority()` (node:os), with what it throws returned as an `Err`: `SystemError [ERR_SYSTEM_ERROR] {info, errno, syscall: 'uv_os_setpriority'}`. */
|
|
14
|
+
export declare function setPriority(pid: number, priority: number): Result<void, NodeError<"ERR_SYSTEM_ERROR", "SystemError", { info: { errno: number; code: string; message: string; syscall: string; path?: string; dest?: string }; errno: number; syscall: "uv_os_setpriority" }>>;
|
|
15
|
+
/** `userInfo()` (node:os), with what it throws returned as an `Err`: `SystemError [ERR_SYSTEM_ERROR] {info, errno, syscall: 'uv_os_get_passwd'}`. */
|
|
16
|
+
export declare function userInfo(options?: $os.UserInfoOptionsWithStringEncoding): Result<$os.UserInfo<string>, NodeError<"ERR_SYSTEM_ERROR", "SystemError", { info: { errno: number; code: string; message: string; syscall: string; path?: string; dest?: string }; errno: number; syscall: "uv_os_get_passwd" }>>;
|
|
17
|
+
/** `userInfo()` (node:os), with what it throws returned as an `Err`: `SystemError [ERR_SYSTEM_ERROR] {info, errno, syscall: 'uv_os_get_passwd'}`. */
|
|
18
|
+
export declare function userInfo(options: $os.UserInfoOptionsWithBufferEncoding): Result<$os.UserInfo<$buffer.NonSharedBuffer>, NodeError<"ERR_SYSTEM_ERROR", "SystemError", { info: { errno: number; code: string; message: string; syscall: string; path?: string; dest?: string }; errno: number; syscall: "uv_os_get_passwd" }>>;
|
|
19
|
+
/** `userInfo()` (node:os), with what it throws returned as an `Err`: `SystemError [ERR_SYSTEM_ERROR] {info, errno, syscall: 'uv_os_get_passwd'}`. */
|
|
20
|
+
export declare function userInfo(options: $os.UserInfoOptions): Result<$os.UserInfo<string | $buffer.NonSharedBuffer>, NodeError<"ERR_SYSTEM_ERROR", "SystemError", { info: { errno: number; code: string; message: string; syscall: string; path?: string; dest?: string }; errno: number; syscall: "uv_os_get_passwd" }>>;
|
package/safe/os.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import * as $module from "node:os";
|
|
4
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
5
|
+
export * from "node:os";
|
|
6
|
+
|
|
7
|
+
export function getPriority(...args) {
|
|
8
|
+
try {
|
|
9
|
+
return $module.getPriority(...args);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return new Err(error);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function setPriority(...args) {
|
|
16
|
+
try {
|
|
17
|
+
return $module.setPriority(...args);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
return new Err(error);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function userInfo(...args) {
|
|
24
|
+
try {
|
|
25
|
+
return $module.userInfo(...args);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
return new Err(error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { DOMError } from "./errors.js";
|
|
5
|
+
import type * as $perf_hooks from "node:perf_hooks";
|
|
6
|
+
export * from "node:perf_hooks";
|
|
7
|
+
|
|
8
|
+
/** `Performance#measure()` (node:perf_hooks), with what it throws returned as an `Err`: `DOMException [SyntaxError]`. */
|
|
9
|
+
export declare function measure(performance: $perf_hooks.Performance, measureName: string, startMark?: string, endMark?: string): Result<$perf_hooks.PerformanceMeasure, DOMError<"SyntaxError">>;
|
|
10
|
+
/** `Performance#measure()` (node:perf_hooks), with what it throws returned as an `Err`: `DOMException [SyntaxError]`. */
|
|
11
|
+
export declare function measure(performance: $perf_hooks.Performance, measureName: string, options: $perf_hooks.PerformanceMeasureOptions, endMark?: string): Result<$perf_hooks.PerformanceMeasure, DOMError<"SyntaxError">>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
export * from "node:perf_hooks";
|
|
5
|
+
|
|
6
|
+
export function measure(self, ...args) {
|
|
7
|
+
try {
|
|
8
|
+
return self.measure(...args);
|
|
9
|
+
} catch (error) {
|
|
10
|
+
return new Err(error);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Option, Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { NodeError, SystemError } from "./errors.js";
|
|
5
|
+
import type * as $fs from "node:fs";
|
|
6
|
+
export { abort, addUncaughtExceptionCaptureCallback, allowedNodeEnvironmentFlags, arch, argv, argv0, availableMemory, config, constrainedMemory, cpuUsage, debugPort, emitWarning, env, execArgv, execPath, exit, exitCode, features, finalization, getActiveResourcesInfo, getBuiltinModule, getegid, geteuid, getgid, getgroups, getuid, hasUncaughtExceptionCaptureCallback, hrtime, memoryUsage, nextTick, pid, platform, ppid, ref, release, report, resourceUsage, setSourceMapsEnabled, sourceMapsEnabled, stderr, stdin, stdout, threadCpuUsage, title, umask, unref, uptime, version, versions } from "node:process";
|
|
7
|
+
|
|
8
|
+
/** `chdir()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'chdir', path, dest}`. */
|
|
9
|
+
export declare function chdir(directory: string): Result<void, SystemError<"chdir", { path: string; dest: string }>>;
|
|
10
|
+
/** `cwd()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'uv_cwd'}`. */
|
|
11
|
+
export declare function cwd(): Result<string, SystemError<"uv_cwd">>;
|
|
12
|
+
/** `dlopen()` (node:process), with what it throws returned as an `Err`: `Error [ERR_DLOPEN_FAILED]`. */
|
|
13
|
+
export declare function dlopen(module: object, filename: string, flags?: number): Result<void, NodeError<"ERR_DLOPEN_FAILED">>;
|
|
14
|
+
/** `execve()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'execve', path} | TypeError [ERR_WORKER_UNSUPPORTED_OPERATION | ERR_FEATURE_UNAVAILABLE_ON_PLATFORM]`. */
|
|
15
|
+
export declare function execve(file: string, args?: readonly string[], env?: NodeJS.ProcessEnv): Result<never, SystemError<"execve", { path: string }> | NodeError<"ERR_WORKER_UNSUPPORTED_OPERATION" | "ERR_FEATURE_UNAVAILABLE_ON_PLATFORM", "TypeError">>;
|
|
16
|
+
/** `kill()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'kill'}`. */
|
|
17
|
+
export declare function kill(pid: number, signal?: string | number): Result<true, SystemError<"kill">>;
|
|
18
|
+
/** `loadEnvFile()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'open' | 'read', path}`. */
|
|
19
|
+
export declare function loadEnvFile(path?: $fs.PathLike): Result<void, SystemError<"open" | "read", { path: string }>>;
|
|
20
|
+
/** `setegid()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'setegid'} | Error [ERR_UNKNOWN_CREDENTIAL]`. */
|
|
21
|
+
export declare function setegid(id: number | string): Result<void, SystemError<"setegid"> | NodeError<"ERR_UNKNOWN_CREDENTIAL">>;
|
|
22
|
+
/** `seteuid()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'seteuid'} | Error [ERR_UNKNOWN_CREDENTIAL]`. */
|
|
23
|
+
export declare function seteuid(id: number | string): Result<void, SystemError<"seteuid"> | NodeError<"ERR_UNKNOWN_CREDENTIAL">>;
|
|
24
|
+
/** `setgid()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'setgid'} | Error [ERR_UNKNOWN_CREDENTIAL]`. */
|
|
25
|
+
export declare function setgid(id: number | string): Result<void, SystemError<"setgid"> | NodeError<"ERR_UNKNOWN_CREDENTIAL">>;
|
|
26
|
+
/** `setgroups()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'setgroups'} | Error [ERR_UNKNOWN_CREDENTIAL]`. */
|
|
27
|
+
export declare function setgroups(groups: ReadonlyArray<string | number>): Result<void, SystemError<"setgroups"> | NodeError<"ERR_UNKNOWN_CREDENTIAL">>;
|
|
28
|
+
/** `setuid()` (node:process), with what it throws returned as an `Err`: `Error [E*] {errno, syscall: 'setuid'} | Error [ERR_UNKNOWN_CREDENTIAL]`. */
|
|
29
|
+
export declare function setuid(id: number | string): Result<void, SystemError<"setuid"> | NodeError<"ERR_UNKNOWN_CREDENTIAL">>;
|
|
30
|
+
/** `setUncaughtExceptionCaptureCallback()` (node:process), with `undefined` passed on as `null` for the first argument. */
|
|
31
|
+
export declare function setUncaughtExceptionCaptureCallback(cb: Option<((err: unknown) => void)>): void;
|
package/safe/process.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import * as $module from "node:process";
|
|
4
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
5
|
+
export * from "node:process";
|
|
6
|
+
|
|
7
|
+
export function chdir(...args) {
|
|
8
|
+
try {
|
|
9
|
+
return $module.chdir(...args);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return new Err(error);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function cwd(...args) {
|
|
16
|
+
try {
|
|
17
|
+
return $module.cwd(...args);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
return new Err(error);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function dlopen(...args) {
|
|
24
|
+
try {
|
|
25
|
+
return $module.dlopen(...args);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
return new Err(error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function execve(...args) {
|
|
32
|
+
try {
|
|
33
|
+
return $module.execve(...args);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return new Err(error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function kill(...args) {
|
|
40
|
+
try {
|
|
41
|
+
return $module.kill(...args);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
return new Err(error);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function loadEnvFile(...args) {
|
|
48
|
+
try {
|
|
49
|
+
return $module.loadEnvFile(...args);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
return new Err(error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function setegid(...args) {
|
|
56
|
+
try {
|
|
57
|
+
return $module.setegid(...args);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
return new Err(error);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function seteuid(...args) {
|
|
64
|
+
try {
|
|
65
|
+
return $module.seteuid(...args);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
return new Err(error);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function setgid(...args) {
|
|
72
|
+
try {
|
|
73
|
+
return $module.setgid(...args);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
return new Err(error);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function setgroups(...args) {
|
|
80
|
+
try {
|
|
81
|
+
return $module.setgroups(...args);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
return new Err(error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function setuid(...args) {
|
|
88
|
+
try {
|
|
89
|
+
return $module.setuid(...args);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
return new Err(error);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function setUncaughtExceptionCaptureCallback(a0) {
|
|
96
|
+
return $module.setUncaughtExceptionCaptureCallback(a0 ?? null);
|
|
97
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import type { PlainError } from "./errors.js";
|
|
5
|
+
export * from "node:punycode";
|
|
6
|
+
|
|
7
|
+
/** `decode()` (node:punycode), with what it throws returned as an `Err`: `RangeError`. */
|
|
8
|
+
export declare function decode(string: string): Result<string, PlainError<"RangeError">>;
|
|
9
|
+
/** `toUnicode()` (node:punycode), with what it throws returned as an `Err`: `RangeError`. */
|
|
10
|
+
export declare function toUnicode(domain: string): Result<string, PlainError<"RangeError">>;
|
package/safe/punycode.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from node-api.json and @types/node by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import * as $module from "node:punycode";
|
|
4
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
5
|
+
export * from "node:punycode";
|
|
6
|
+
|
|
7
|
+
export function decode(...args) {
|
|
8
|
+
try {
|
|
9
|
+
return $module.decode(...args);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return new Err(error);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function toUnicode(...args) {
|
|
16
|
+
try {
|
|
17
|
+
return $module.toUnicode(...args);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
return new Err(error);
|
|
20
|
+
}
|
|
21
|
+
}
|