@scriptc/compiler 0.1.2 → 0.1.4
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/ambient/scriptc-node-fallback.d.ts +258 -64
- package/dist/backend/c/async.d.ts +30 -0
- package/dist/backend/c/async.js +224 -0
- package/dist/backend/c/async.js.map +1 -1
- package/dist/backend/c/c-emitter.d.ts +13 -0
- package/dist/backend/c/c-emitter.js +28 -9
- package/dist/backend/c/c-emitter.js.map +1 -1
- package/dist/backend/c/exprs.d.ts +8 -1
- package/dist/backend/c/exprs.js +445 -60
- package/dist/backend/c/exprs.js.map +1 -1
- package/dist/backend/c/shapes.js +15 -13
- package/dist/backend/c/shapes.js.map +1 -1
- package/dist/backend/c/types.d.ts +4 -0
- package/dist/backend/c/types.js +20 -1
- package/dist/backend/c/types.js.map +1 -1
- package/dist/backend/c/types.test.js +8 -1
- package/dist/backend/c/types.test.js.map +1 -1
- package/dist/backend/c/walkers.js +32 -11
- package/dist/backend/c/walkers.js.map +1 -1
- package/dist/backend/json-literal.d.ts +7 -0
- package/dist/backend/json-literal.js +17 -0
- package/dist/backend/json-literal.js.map +1 -0
- package/dist/backend/json-literal.test.d.ts +1 -0
- package/dist/backend/json-literal.test.js +17 -0
- package/dist/backend/json-literal.test.js.map +1 -0
- package/dist/backend/link-plan.d.ts +2 -1
- package/dist/backend/link-plan.js +6 -1
- package/dist/backend/link-plan.js.map +1 -1
- package/dist/backend/llvm/classes.js +8 -7
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/common.d.ts +4 -0
- package/dist/backend/llvm/common.js +6 -0
- package/dist/backend/llvm/common.js.map +1 -1
- package/dist/backend/llvm/common.test.d.ts +1 -0
- package/dist/backend/llvm/common.test.js +9 -0
- package/dist/backend/llvm/common.test.js.map +1 -0
- package/dist/backend/llvm/dyn.d.ts +4 -0
- package/dist/backend/llvm/dyn.js +24 -13
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.js +54 -12
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.d.ts +1 -1
- package/dist/backend/llvm/expr-bytes.js +8 -8
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-callbacks.d.ts +9 -0
- package/dist/backend/llvm/expr-callbacks.js +125 -0
- package/dist/backend/llvm/expr-callbacks.js.map +1 -1
- package/dist/backend/llvm/expr-context.d.ts +18 -2
- package/dist/backend/llvm/expr-dispatch.js +1 -0
- package/dist/backend/llvm/expr-dispatch.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +9 -0
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.d.ts +1 -1
- package/dist/backend/llvm/expr-primitives.js +38 -9
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.test.d.ts +1 -0
- package/dist/backend/llvm/expr-primitives.test.js +38 -0
- package/dist/backend/llvm/expr-primitives.test.js.map +1 -0
- package/dist/backend/llvm/expr-records.js +3 -3
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +2 -1
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +6 -0
- package/dist/backend/llvm/expr-stream-callbacks.js +122 -0
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +22 -0
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +68 -10
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-network.js +18 -2
- package/dist/backend/llvm/lib-network.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +206 -11
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +82 -0
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/lib-stream.js +23 -0
- package/dist/backend/llvm/lib-stream.js.map +1 -1
- package/dist/backend/llvm/shapes.js +10 -8
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/llvm/walkers.js +7 -5
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/backend/native-link-info.d.ts +2 -1
- package/dist/backend/native-link-info.js +4 -0
- package/dist/backend/native-link-info.js.map +1 -1
- package/dist/backend/native-link-info.test.js +24 -1
- package/dist/backend/native-link-info.test.js.map +1 -1
- package/dist/backend/native-toolchain.d.ts +11 -6
- package/dist/backend/native-toolchain.js +30 -13
- package/dist/backend/native-toolchain.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +36 -1
- package/dist/backend/native-toolchain.test.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +1 -1
- package/dist/backend/runtime-pack-targets.test.js.map +1 -1
- package/dist/backend/runtime-pack.test.js +29 -10
- package/dist/backend/runtime-pack.test.js.map +1 -1
- package/dist/backend/targets.d.ts +9 -0
- package/dist/backend/targets.js +22 -0
- package/dist/backend/targets.js.map +1 -1
- package/dist/backend/targets.test.js +13 -1
- package/dist/backend/targets.test.js.map +1 -1
- package/dist/coverage/surface-manifest.js +9 -0
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.js +4 -4
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +3 -0
- package/dist/executable/executable-cache.js +4 -0
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +1 -0
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/frontend/fork-target.d.ts +17 -0
- package/dist/frontend/fork-target.js +256 -0
- package/dist/frontend/fork-target.js.map +1 -0
- package/dist/frontend/lowering/abstract-equality.d.ts +6 -0
- package/dist/frontend/lowering/abstract-equality.js +250 -0
- package/dist/frontend/lowering/abstract-equality.js.map +1 -0
- package/dist/frontend/lowering/containers/bytes.d.ts +0 -4
- package/dist/frontend/lowering/containers/bytes.js +112 -28
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +87 -12
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +72 -44
- package/dist/frontend/lowering/lower-builtins.js +1323 -165
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +37 -27
- package/dist/frontend/lowering/lower-calls.js +682 -132
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +39 -8
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.js +162 -8
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-event-emitter.js +212 -21
- package/dist/frontend/lowering/lower-event-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.js +238 -87
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.d.ts +4 -0
- package/dist/frontend/lowering/lower-inspect.js +8 -1
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +6 -3
- package/dist/frontend/lowering/lower-island.js +165 -6
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.d.ts +6 -0
- package/dist/frontend/lowering/lower-modules.js +192 -38
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.js +7 -0
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.d.ts +1 -1
- package/dist/frontend/lowering/lower-server.js +130 -27
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +5 -4
- package/dist/frontend/lowering/lower-stmts.js +141 -21
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.d.ts +3 -0
- package/dist/frontend/lowering/lower-stream.js +7 -0
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +90 -13
- package/dist/frontend/lowering/lowerer.js +416 -76
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +31 -3
- package/dist/frontend/lowering/surfaces.js +173 -90
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/npm-static-declarations.d.ts +4 -0
- package/dist/frontend/npm-static-declarations.js +83 -14
- package/dist/frontend/npm-static-declarations.js.map +1 -1
- package/dist/frontend/npm-static-declarations.test.js +33 -2
- package/dist/frontend/npm-static-declarations.test.js.map +1 -1
- package/dist/frontend/npm-static.js +6 -5
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm.d.ts +15 -3
- package/dist/frontend/npm.js +80 -8
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/npm.test.js +76 -9
- package/dist/frontend/npm.test.js.map +1 -1
- package/dist/frontend/program.js +110 -12
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/resolve.d.ts +28 -7
- package/dist/frontend/resolve.js +90 -26
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/resolve.test.js +21 -1
- package/dist/frontend/resolve.test.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +5 -0
- package/dist/frontend/type-mapper.js +115 -33
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +30 -3
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.js +1 -0
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/ir.d.ts +155 -66
- package/dist/ir/ir.js +143 -6
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +14 -1
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/serialize.d.ts +1 -1
- package/dist/ir/serialize.js +1 -1
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/validate.js +242 -18
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/int-infer.test.js +4 -4
- package/dist/library/int-infer.test.js.map +1 -1
- package/dist/library/library-cache.d.ts +1 -0
- package/dist/library/library-cache.js +1 -0
- package/dist/library/library-cache.js.map +1 -1
- package/dist/library/library-cache.test.js +18 -5
- package/dist/library/library-cache.test.js.map +1 -1
- package/package.json +17 -17
- package/surface-manifest.json +163 -54
|
@@ -62,15 +62,14 @@ declare namespace NodeJS {
|
|
|
62
62
|
* keeps the loop alive. */
|
|
63
63
|
interface ReadableStream {
|
|
64
64
|
on(event: "data", listener: (chunk: Buffer) => void): void;
|
|
65
|
+
on(event: "data", listener: (chunk: string) => void): void;
|
|
65
66
|
on(event: "end", listener: () => void): void;
|
|
66
67
|
once(event: "data", listener: (chunk: Buffer) => void): void;
|
|
68
|
+
once(event: "data", listener: (chunk: string) => void): void;
|
|
67
69
|
once(event: "end", listener: () => void): void;
|
|
68
|
-
/*
|
|
69
|
-
*
|
|
70
|
-
|
|
71
|
-
* 'data', hence the string arm on the listener above being absent:
|
|
72
|
-
* the lowered surface is bytes-only. */
|
|
73
|
-
setEncoding(encoding: string): void;
|
|
70
|
+
/* setEncoding('utf8') makes subsequent data chunks strings, including
|
|
71
|
+
* multibyte sequences split across native pipe reads. */
|
|
72
|
+
setEncoding(encoding: string): this;
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
|
|
@@ -181,11 +180,13 @@ declare var process: {
|
|
|
181
180
|
* callers forward a `string | null` result field. */
|
|
182
181
|
kill(pid: number, signal?: string | number | null): true;
|
|
183
182
|
env: { [name: string]: string | undefined };
|
|
183
|
+
/** Numeric writes set the status returned by ordinary program exit. */
|
|
184
|
+
exitCode?: number;
|
|
184
185
|
/* `never`, like @types/node: code behind an early-exit guard narrows
|
|
185
186
|
* (`if (!x) process.exit(1)` proves x afterwards) — typed `void` the
|
|
186
187
|
* guard narrows nothing and correct programs fail preflight. The
|
|
187
|
-
* lowering already handles the optional code (bare exit()
|
|
188
|
-
*
|
|
188
|
+
* lowering already handles the optional code (bare exit() uses exitCode,
|
|
189
|
+
* or zero when it was never set). */
|
|
189
190
|
exit(code?: number | null): never;
|
|
190
191
|
cwd(): string;
|
|
191
192
|
/* The user tick queue: callbacks run before promise jobs at every loop
|
|
@@ -280,8 +281,27 @@ declare var process: {
|
|
|
280
281
|
/* emitWarning — Node's full grammar (string or Error warning; type/
|
|
281
282
|
* ctor/options second; code/ctor third). */
|
|
282
283
|
emitWarning(warning: string | Error, ...args: any[]): void;
|
|
284
|
+
/** Present in a child created by child_process.fork(). */
|
|
285
|
+
readonly connected: boolean;
|
|
286
|
+
send?(message: object, callback?: (error: Error | null) => void): boolean;
|
|
287
|
+
disconnect(): void;
|
|
288
|
+
on(event: "message", listener: (message: any) => void): void;
|
|
289
|
+
on(event: "disconnect", listener: () => void): void;
|
|
290
|
+
once(event: "message", listener: (message: any) => void): void;
|
|
291
|
+
once(event: "disconnect", listener: () => void): void;
|
|
283
292
|
};
|
|
284
293
|
|
|
294
|
+
/* Node's process module default export is the global process object. These
|
|
295
|
+
* declaration aliases let the ESM spelling typecheck against the same
|
|
296
|
+
* deliberately narrow fallback surface when @types/node is absent. */
|
|
297
|
+
declare module "process" {
|
|
298
|
+
export = process;
|
|
299
|
+
}
|
|
300
|
+
declare module "node:process" {
|
|
301
|
+
import process = require("process");
|
|
302
|
+
export = process;
|
|
303
|
+
}
|
|
304
|
+
|
|
285
305
|
/* ── globals a real CLI's sources reference (all @types/node or dyn-lib
|
|
286
306
|
* territory; the fallback declares the slice so projects PREFLIGHT and
|
|
287
307
|
* every reached use lands on the SC2020 fence — or a real lowering where
|
|
@@ -463,6 +483,12 @@ interface Buffer<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends
|
|
|
463
483
|
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
|
464
484
|
writeIntBE(value: number, offset: number, byteLength: number): number;
|
|
465
485
|
writeIntLE(value: number, offset: number, byteLength: number): number;
|
|
486
|
+
writeBigInt64BE(value: bigint, offset?: number): number;
|
|
487
|
+
writeBigInt64LE(value: bigint, offset?: number): number;
|
|
488
|
+
writeBigUInt64BE(value: bigint, offset?: number): number;
|
|
489
|
+
writeBigUInt64LE(value: bigint, offset?: number): number;
|
|
490
|
+
writeBigUint64BE(value: bigint, offset?: number): number;
|
|
491
|
+
writeBigUint64LE(value: bigint, offset?: number): number;
|
|
466
492
|
readUInt8(offset?: number): number;
|
|
467
493
|
readUInt16BE(offset?: number): number;
|
|
468
494
|
readUInt16LE(offset?: number): number;
|
|
@@ -481,6 +507,12 @@ interface Buffer<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> extends
|
|
|
481
507
|
readUIntLE(offset: number, byteLength: number): number;
|
|
482
508
|
readIntBE(offset: number, byteLength: number): number;
|
|
483
509
|
readIntLE(offset: number, byteLength: number): number;
|
|
510
|
+
readBigInt64BE(offset?: number): bigint;
|
|
511
|
+
readBigInt64LE(offset?: number): bigint;
|
|
512
|
+
readBigUInt64BE(offset?: number): bigint;
|
|
513
|
+
readBigUInt64LE(offset?: number): bigint;
|
|
514
|
+
readBigUint64BE(offset?: number): bigint;
|
|
515
|
+
readBigUint64LE(offset?: number): bigint;
|
|
484
516
|
}
|
|
485
517
|
interface BufferConstructor {
|
|
486
518
|
from(data: string, encoding?: BufferEncoding): Buffer;
|
|
@@ -747,6 +779,7 @@ interface Request {
|
|
|
747
779
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
748
780
|
bytes(): Promise<Uint8Array>;
|
|
749
781
|
}
|
|
782
|
+
type RequestInfo = string | URL | Request;
|
|
750
783
|
interface RequestInit {
|
|
751
784
|
method?: string;
|
|
752
785
|
headers?:
|
|
@@ -759,7 +792,7 @@ interface RequestInit {
|
|
|
759
792
|
signal?: AbortSignal;
|
|
760
793
|
}
|
|
761
794
|
declare var Request: {
|
|
762
|
-
new (input:
|
|
795
|
+
new (input: RequestInfo, init?: RequestInit): Request;
|
|
763
796
|
readonly prototype: Request;
|
|
764
797
|
};
|
|
765
798
|
declare function fetch(input: string | URL, init?: RequestInit): Promise<Response>;
|
|
@@ -924,15 +957,19 @@ declare var performance: import("node:perf_hooks").Performance;
|
|
|
924
957
|
* createRequire(import.meta.url) (or __filename) whose require calls
|
|
925
958
|
* take STATIC string literals — the indirection erases at compile time.
|
|
926
959
|
* A builtin spec makes the binding a namespace import in const clothing;
|
|
927
|
-
*
|
|
928
|
-
*
|
|
929
|
-
*
|
|
930
|
-
*
|
|
931
|
-
*
|
|
960
|
+
* relative and package-import program modules use the compiled module
|
|
961
|
+
* graph; a relative .json document bakes and parses (JSON.parse's
|
|
962
|
+
* `unknown` stance — validate with a checked cast); an installed npm
|
|
963
|
+
* package loads through the island's require-condition entry under
|
|
964
|
+
* --dynamic, or through the compiled graph under --npm-static; a bare name
|
|
965
|
+
* nothing installed resolves compiles to Node's catchable MODULE_NOT_FOUND
|
|
966
|
+
* throw (the optional-dependency try/require pattern).
|
|
932
967
|
* Dynamic specifiers fence: a compiled binary's module graph is fixed at
|
|
933
968
|
* build time. builtinModules is the baked Node v24 list (a fresh
|
|
934
969
|
* mutable array per read where Node ships one frozen singleton);
|
|
935
|
-
* isBuiltin
|
|
970
|
+
* isBuiltin checks runtime strings against that pinned list, and
|
|
971
|
+
* syncBuiltinESMExports is a no-op because the static builtin surface is
|
|
972
|
+
* immutable. Both spellings
|
|
936
973
|
* name the builtin, like in Node (the builtin wins over the npm package
|
|
937
974
|
* named "module" for the bare specifier there too). */
|
|
938
975
|
declare module "node:module" {
|
|
@@ -984,6 +1021,15 @@ declare module "node:fs" {
|
|
|
984
1021
|
export function readFileSync(fd: number): Buffer;
|
|
985
1022
|
/* The options-object spelling of the utf8 form. */
|
|
986
1023
|
export function readFileSync(path: string, options: { encoding: "utf8" | "utf-8" }): string;
|
|
1024
|
+
/* Error-first callback target used by the static util.promisify
|
|
1025
|
+
* projection. Its options stay unknown because direct calls remain
|
|
1026
|
+
* outside the typed fs slice; this also lets checked-JS validation
|
|
1027
|
+
* ladders observe invalid runtime encodings without contextual narrowing. */
|
|
1028
|
+
export function readFile(
|
|
1029
|
+
path: string,
|
|
1030
|
+
options: unknown,
|
|
1031
|
+
callback: (error: Error | null, data: string) => void,
|
|
1032
|
+
): void;
|
|
987
1033
|
/* The options form carries the mode (applied at CREATION only, like
|
|
988
1034
|
* Node — an existing file keeps its permissions) and/or the utf8
|
|
989
1035
|
* encoding spelling. */
|
|
@@ -1003,6 +1049,9 @@ declare module "node:fs" {
|
|
|
1003
1049
|
export function mkdirSync(path: string, options: { recursive?: boolean; mode?: number }): void;
|
|
1004
1050
|
export function unlinkSync(path: string): void;
|
|
1005
1051
|
export function chmodSync(path: string, mode: number): void;
|
|
1052
|
+
export function fchmodSync(fd: number, mode: number): void;
|
|
1053
|
+
export function fsyncSync(fd: number): void;
|
|
1054
|
+
export function linkSync(existingPath: string, newPath: string): void;
|
|
1006
1055
|
export function chownSync(path: string, uid: number, gid: number): void;
|
|
1007
1056
|
/* The 2-argument form only (Node's mode flags have no lowering). The
|
|
1008
1057
|
* destination is created or truncated carrying the SOURCE's mode. */
|
|
@@ -1041,36 +1090,61 @@ declare module "node:fs" {
|
|
|
1041
1090
|
readonly R_OK: number;
|
|
1042
1091
|
readonly W_OK: number;
|
|
1043
1092
|
readonly X_OK: number;
|
|
1093
|
+
readonly O_RDONLY: number;
|
|
1094
|
+
readonly O_WRONLY: number;
|
|
1095
|
+
readonly O_RDWR: number;
|
|
1096
|
+
readonly O_CREAT: number;
|
|
1097
|
+
readonly O_EXCL: number;
|
|
1098
|
+
readonly O_NOFOLLOW: number;
|
|
1099
|
+
readonly O_NONBLOCK: number;
|
|
1100
|
+
readonly O_TRUNC: number;
|
|
1101
|
+
readonly O_APPEND: number;
|
|
1044
1102
|
};
|
|
1045
1103
|
/* A stat(2) snapshot (statSync follows symlinks, lstatSync does not —
|
|
1046
1104
|
* Node's split) — immutable; the supported surface is exactly these
|
|
1047
|
-
* members.
|
|
1048
|
-
* fields are milliseconds with their
|
|
1105
|
+
* members. dev/ino identify the filesystem entry, blocks is the allocated
|
|
1106
|
+
* size in 512-byte units, and the time fields are milliseconds with their
|
|
1107
|
+
* sub-second fractions. */
|
|
1049
1108
|
export interface Stats {
|
|
1050
1109
|
isFile(): boolean;
|
|
1051
1110
|
isDirectory(): boolean;
|
|
1052
1111
|
isSymbolicLink(): boolean;
|
|
1112
|
+
readonly dev: number;
|
|
1113
|
+
readonly ino: number;
|
|
1053
1114
|
readonly size: number;
|
|
1054
1115
|
readonly blocks: number;
|
|
1055
1116
|
readonly nlink: number;
|
|
1056
1117
|
readonly atimeMs: number;
|
|
1057
1118
|
readonly mtimeMs: number;
|
|
1119
|
+
readonly ctimeMs: number;
|
|
1058
1120
|
}
|
|
1059
1121
|
export function statSync(path: string): Stats;
|
|
1060
1122
|
export function lstatSync(path: string): Stats;
|
|
1061
1123
|
/* The fd pair behind spawn's fd-stdio form: openSync(path, flags) →
|
|
1062
|
-
* the raw fd
|
|
1063
|
-
* variants), closeSync(fd). */
|
|
1124
|
+
* the raw fd. Numeric flags use an inline OR of the O_* constants. */
|
|
1064
1125
|
export function openSync(path: string, flags: string): number;
|
|
1126
|
+
export function openSync(path: string, flags: number, mode?: number): number;
|
|
1065
1127
|
export function closeSync(fd: number): void;
|
|
1066
1128
|
/* Read into a caller buffer from the fd's current position when position
|
|
1067
1129
|
* is omitted/null, or from a numeric byte position without advancing the
|
|
1068
1130
|
* fd. Answers the byte count, 0 at EOF. */
|
|
1131
|
+
export interface ReadSyncOptions {
|
|
1132
|
+
offset?: number;
|
|
1133
|
+
length?: number;
|
|
1134
|
+
position?: number | null;
|
|
1135
|
+
}
|
|
1136
|
+
export function readSync(fd: number, buffer: Uint8Array, options?: ReadSyncOptions): number;
|
|
1069
1137
|
export function readSync(fd: number, buffer: Uint8Array, offset: number, length: number, position?: number | null): number;
|
|
1070
1138
|
/* Write a caller-buffer window, or a utf8 string, at the fd's current
|
|
1071
1139
|
* position when position is omitted/null (advancing it), or at a numeric
|
|
1072
1140
|
* byte position without advancing it. Answers the byte count. */
|
|
1073
|
-
export
|
|
1141
|
+
export interface WriteSyncOptions {
|
|
1142
|
+
offset?: number;
|
|
1143
|
+
length?: number;
|
|
1144
|
+
position?: number | null;
|
|
1145
|
+
}
|
|
1146
|
+
export function writeSync(fd: number, buffer: Uint8Array, options: WriteSyncOptions): number;
|
|
1147
|
+
export function writeSync(fd: number, buffer: Uint8Array, offset?: number, length?: number, position?: number | null): number;
|
|
1074
1148
|
export function writeSync(fd: number, string: string, position?: number | null, encoding?: "utf8" | "utf-8"): number;
|
|
1075
1149
|
/* statSync over an open fd — the same Stats snapshot. */
|
|
1076
1150
|
export function fstatSync(fd: number): Stats;
|
|
@@ -1175,8 +1249,19 @@ declare module "fs/promises" {
|
|
|
1175
1249
|
export function writeFile(path: string, data: string, encoding: "utf8" | "utf-8"): Promise<void>;
|
|
1176
1250
|
export function mkdir(path: string, options?: { recursive?: boolean; mode?: number }): Promise<void>;
|
|
1177
1251
|
export function readdir(path: string): Promise<string[]>;
|
|
1252
|
+
export function readdir(
|
|
1253
|
+
path: string,
|
|
1254
|
+
options: {
|
|
1255
|
+
encoding?: "utf8" | "utf-8";
|
|
1256
|
+
withFileTypes: true;
|
|
1257
|
+
recursive?: boolean;
|
|
1258
|
+
[option: string]: unknown;
|
|
1259
|
+
},
|
|
1260
|
+
): Promise<import("node:fs").Dirent[]>;
|
|
1178
1261
|
export function rm(path: string): Promise<void>;
|
|
1179
1262
|
export function stat(path: string): Promise<import("node:fs").Stats>;
|
|
1263
|
+
export function realpath(path: string): Promise<string>;
|
|
1264
|
+
export function lstat(path: string): Promise<import("node:fs").Stats>;
|
|
1180
1265
|
export function unlink(path: string): Promise<void>;
|
|
1181
1266
|
export function chmod(path: string, mode: number): Promise<void>;
|
|
1182
1267
|
export function rename(oldPath: string, newPath: string): Promise<void>;
|
|
@@ -1305,7 +1390,7 @@ declare module "node:os" {
|
|
|
1305
1390
|
/* The WHATWG URL class (a Node global; the es2023 lib doesn't declare it),
|
|
1306
1391
|
* typed as exactly the supported surface: construction from ONE absolute-
|
|
1307
1392
|
* URL string (invalid input throws a catchable TypeError, like Node), the
|
|
1308
|
-
* protocol/pathname/href/host/hostname/search getters, searchParams (the
|
|
1393
|
+
* protocol/origin/username/pathname/href/host/hostname/port/search/hash getters, searchParams (the
|
|
1309
1394
|
* LIVE query view — mutations through it re-serialize into the URL, so
|
|
1310
1395
|
* href reflects immediately; every read answers the same object, Node's
|
|
1311
1396
|
* caching), and toString() (the href serialization).
|
|
@@ -1317,16 +1402,21 @@ declare module "node:os" {
|
|
|
1317
1402
|
* documented in SEMANTICS.md. */
|
|
1318
1403
|
interface URL {
|
|
1319
1404
|
readonly protocol: string;
|
|
1405
|
+
readonly origin: string;
|
|
1406
|
+
readonly username: string;
|
|
1407
|
+
readonly password: string;
|
|
1320
1408
|
readonly pathname: string;
|
|
1321
1409
|
readonly href: string;
|
|
1322
1410
|
readonly host: string;
|
|
1323
1411
|
readonly hostname: string;
|
|
1412
|
+
readonly port: string;
|
|
1324
1413
|
readonly search: string;
|
|
1414
|
+
readonly hash: string;
|
|
1325
1415
|
readonly searchParams: URLSearchParams;
|
|
1326
1416
|
toString(): string;
|
|
1327
1417
|
}
|
|
1328
1418
|
declare var URL: {
|
|
1329
|
-
new (input: string): URL;
|
|
1419
|
+
new (input: string, base?: string | URL): URL;
|
|
1330
1420
|
};
|
|
1331
1421
|
|
|
1332
1422
|
/* URLSearchParams — the WHATWG application/x-www-form-urlencoded list.
|
|
@@ -1366,23 +1456,31 @@ declare module "node:url" {
|
|
|
1366
1456
|
export * from "url";
|
|
1367
1457
|
}
|
|
1368
1458
|
|
|
1369
|
-
/* node:crypto:
|
|
1370
|
-
* the composed randomBytes(n).toString("hex" | "base64") still lowers as
|
|
1371
|
-
* one fused string-producing operation (the Buffer never materializes
|
|
1372
|
-
* there); every other use gets an ordinary Buffer value. */
|
|
1459
|
+
/* node:crypto: the static hashing/MAC/random/PBKDF2 utility slice. */
|
|
1373
1460
|
declare module "crypto" {
|
|
1374
1461
|
export function randomUUID(): string;
|
|
1375
1462
|
export function randomBytes(size: number): Buffer;
|
|
1376
|
-
/* The lowered Hash surface is exactly the COMPOSED chain
|
|
1377
|
-
* createHash("sha256" | "sha1").update(data).digest("hex" | "base64")
|
|
1378
|
-
* — fused into one call, the Hash handle never materializes (holding
|
|
1379
|
-
* one fences). sha1 exists for the RFC 6455 Sec-WebSocket-Accept
|
|
1380
|
-
* hash. */
|
|
1381
1463
|
export interface Hash {
|
|
1382
|
-
update(data: string | Uint8Array): Hash;
|
|
1464
|
+
update(data: string | Uint8Array, inputEncoding?: "utf8" | "utf-8" | "hex" | "base64"): Hash;
|
|
1465
|
+
digest(): Buffer;
|
|
1466
|
+
digest(encoding: "hex" | "base64"): string;
|
|
1467
|
+
copy(): Hash;
|
|
1468
|
+
}
|
|
1469
|
+
export interface Hmac {
|
|
1470
|
+
update(data: string | Uint8Array, inputEncoding?: "utf8" | "utf-8" | "hex" | "base64"): Hmac;
|
|
1471
|
+
digest(): Buffer;
|
|
1383
1472
|
digest(encoding: "hex" | "base64"): string;
|
|
1384
1473
|
}
|
|
1385
1474
|
export function createHash(algorithm: string): Hash;
|
|
1475
|
+
export function createHmac(algorithm: string, key: string | Uint8Array): Hmac;
|
|
1476
|
+
export function hash(algorithm: string, data: string | Uint8Array, outputEncoding?: "hex" | "base64"): string;
|
|
1477
|
+
export function timingSafeEqual(a: Uint8Array, b: Uint8Array): boolean;
|
|
1478
|
+
export function randomFillSync<T extends Uint8Array>(buffer: T, offset?: number, size?: number): T;
|
|
1479
|
+
export function randomInt(max: number): number;
|
|
1480
|
+
export function randomInt(min: number, max: number): number;
|
|
1481
|
+
export function pbkdf2Sync(password: string | Uint8Array, salt: string | Uint8Array, iterations: number, keylen: number, digest: string): Buffer;
|
|
1482
|
+
export function pbkdf2(password: string | Uint8Array, salt: string | Uint8Array, iterations: number, keylen: number, digest: string, callback: (error: Error | null, derivedKey: Buffer) => void): void;
|
|
1483
|
+
export function randomBytes(size: number, callback: (error: Error | null, buffer: Buffer) => void): void;
|
|
1386
1484
|
/* The lowered X509Certificate surface is the data-record slice:
|
|
1387
1485
|
* fingerprint (the SHA-1 of the DER, uppercase colon-separated) and
|
|
1388
1486
|
* the validFrom/validTo validity window (Node's ASN1_TIME_print
|
|
@@ -1514,23 +1612,43 @@ declare module "child_process" {
|
|
|
1514
1612
|
): SpawnSyncReturns;
|
|
1515
1613
|
|
|
1516
1614
|
/* The asynchronous slice: spawn with stdio "ignore"/"inherit"/fd/"pipe"
|
|
1517
|
-
* tuples (piped
|
|
1518
|
-
* the
|
|
1615
|
+
* tuples (piped stdin is writable through child.stdin; piped stdout/stderr
|
|
1616
|
+
* deliver through child.stdout/stderr) and the terminal events. "exit"
|
|
1617
|
+
* fires once with the exit code, or
|
|
1519
1618
|
* null when the child died to a signal; "error" fires ONLY when the
|
|
1520
1619
|
* child could not be spawned at all (Node's split: a spawn failure
|
|
1521
|
-
* emits "error" and never "exit").
|
|
1522
|
-
*
|
|
1523
|
-
*
|
|
1524
|
-
* is fenced). The event loop keeps the process
|
|
1525
|
-
* spawned child is reaped, like Node — reaping polls at
|
|
1526
|
-
* quiescence (SEMANTICS.md documents the divergence). An "error"
|
|
1620
|
+
* emits "error" and never "exit"). "close" fires after exit/error and
|
|
1621
|
+
* every piped stdio handle reaches EOF. Exit/close listeners may take
|
|
1622
|
+
* Node's code and signal parameters. `on`/`once` return void here (Node
|
|
1623
|
+
* returns the child; chaining is fenced). The event loop keeps the process
|
|
1624
|
+
* alive until every spawned child is reaped, like Node — reaping polls at
|
|
1625
|
+
* loop quiescence (SEMANTICS.md documents the divergence). An "error"
|
|
1527
1626
|
* event with no registered listener prints the error and exits 1,
|
|
1528
1627
|
* exactly the unhandled-'error' EventEmitter behavior. */
|
|
1628
|
+
export interface ChildStdin {
|
|
1629
|
+
readonly writable: boolean;
|
|
1630
|
+
write(chunk: string | Uint8Array): boolean;
|
|
1631
|
+
end(): void;
|
|
1632
|
+
destroy(): void;
|
|
1633
|
+
on(event: "drain" | "finish", listener: () => void): void;
|
|
1634
|
+
on(event: "error", listener: (err: Error) => void): void;
|
|
1635
|
+
once(event: "drain" | "finish", listener: () => void): void;
|
|
1636
|
+
once(event: "error", listener: (err: Error) => void): void;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1529
1639
|
export interface ChildProcess extends Disposable {
|
|
1530
1640
|
/* The exit listener may also take Node's second parameter — the
|
|
1531
1641
|
* terminating signal's name, null for a normal exit. */
|
|
1532
1642
|
on(event: "exit", listener: (code: number | null, signal: string | null) => void): void;
|
|
1643
|
+
on(event: "close", listener: (code: number | null, signal: string | null) => void): void;
|
|
1533
1644
|
on(event: "error", listener: (err: Error) => void): void;
|
|
1645
|
+
once(event: "exit", listener: (code: number | null, signal: string | null) => void): void;
|
|
1646
|
+
once(event: "close", listener: (code: number | null, signal: string | null) => void): void;
|
|
1647
|
+
once(event: "error", listener: (err: Error) => void): void;
|
|
1648
|
+
on(event: "message", listener: (message: any) => void): void;
|
|
1649
|
+
on(event: "disconnect", listener: () => void): void;
|
|
1650
|
+
once(event: "message", listener: (message: any) => void): void;
|
|
1651
|
+
once(event: "disconnect", listener: () => void): void;
|
|
1534
1652
|
/* The lifecycle members, Node's exact shapes: pid is undefined exactly
|
|
1535
1653
|
* when the spawn failed; exitCode is null while running, the code
|
|
1536
1654
|
* after a normal exit, null for a signal death, and -errno once a
|
|
@@ -1546,9 +1664,13 @@ declare module "child_process" {
|
|
|
1546
1664
|
readonly killed: boolean;
|
|
1547
1665
|
kill(signal?: string | number): boolean;
|
|
1548
1666
|
unref(): void;
|
|
1667
|
+
readonly connected: boolean;
|
|
1668
|
+
send(message: object, callback?: (error: Error | null) => void): boolean;
|
|
1669
|
+
disconnect(): void;
|
|
1549
1670
|
[Symbol.dispose](): void;
|
|
1550
|
-
/* The piped
|
|
1551
|
-
*
|
|
1671
|
+
/* The piped streams — non-null exactly when the matching stdio slot
|
|
1672
|
+
* was "pipe" (Node's shape). */
|
|
1673
|
+
readonly stdin: ChildStdin | null;
|
|
1552
1674
|
readonly stdout: NodeJS.ReadableStream | null;
|
|
1553
1675
|
readonly stderr: NodeJS.ReadableStream | null;
|
|
1554
1676
|
}
|
|
@@ -1559,15 +1681,32 @@ declare module "child_process" {
|
|
|
1559
1681
|
/* The 3-tuple form admits number fds in the stdout/stderr slots —
|
|
1560
1682
|
* openSync results dup2'd into the child (the daemon-log idiom
|
|
1561
1683
|
* ["ignore", logFd, logFd]) — and "pipe" there too (child.stdout/
|
|
1562
|
-
* child.stderr streams);
|
|
1684
|
+
* child.stderr streams); "pipe" in the stdin slot exposes
|
|
1685
|
+
* child.stdin. */
|
|
1563
1686
|
stdio: "ignore" | "inherit" | "pipe" | ("ignore" | "inherit" | "pipe" | number)[];
|
|
1564
1687
|
/* detached gives the child its own session and process group
|
|
1565
1688
|
* (POSIX_SPAWN_SETSID); env REPLACES the child environment; cwd
|
|
1566
|
-
* sets its working directory; windowsHide is a POSIX no-op
|
|
1689
|
+
* sets its working directory; windowsHide is a POSIX no-op; shell
|
|
1690
|
+
* runs the complete command string through /bin/sh or cmd.exe. */
|
|
1567
1691
|
detached?: boolean;
|
|
1568
1692
|
env?: { [k: string]: string | undefined };
|
|
1569
1693
|
cwd?: string;
|
|
1570
1694
|
windowsHide?: boolean;
|
|
1695
|
+
shell?: boolean;
|
|
1696
|
+
},
|
|
1697
|
+
): ChildProcess;
|
|
1698
|
+
|
|
1699
|
+
export function fork(
|
|
1700
|
+
modulePath: string | URL,
|
|
1701
|
+
args?: string[],
|
|
1702
|
+
options?: {
|
|
1703
|
+
cwd?: string;
|
|
1704
|
+
env?: { [k: string]: string | undefined };
|
|
1705
|
+
execArgv?: string[];
|
|
1706
|
+
silent?: boolean;
|
|
1707
|
+
stdio?: "pipe" | "ignore" | "inherit" | ("pipe" | "ignore" | "inherit" | "ipc")[];
|
|
1708
|
+
serialization?: "json" | "advanced";
|
|
1709
|
+
windowsHide?: boolean;
|
|
1571
1710
|
},
|
|
1572
1711
|
): ChildProcess;
|
|
1573
1712
|
|
|
@@ -1612,9 +1751,13 @@ declare module "child_process" {
|
|
|
1612
1751
|
}
|
|
1613
1752
|
export function execFileSync(file: string, args?: string[], options?: ExecSyncOptions): string;
|
|
1614
1753
|
export function execSync(command: string, options?: ExecSyncOptions): string;
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
*
|
|
1754
|
+
export type ExecFileCallback = (error: Error | null, stdout: string, stderr: string) => void;
|
|
1755
|
+
/* The callback form starts an asynchronous child and captures utf8
|
|
1756
|
+
* stdout/stderr. The no-callback overload remains for util.promisify's
|
|
1757
|
+
* static target recognition; reached no-callback calls still fence. */
|
|
1758
|
+
export function execFile(file: string, callback: ExecFileCallback): ChildProcess;
|
|
1759
|
+
export function execFile(file: string, args: string[] | null, callback: ExecFileCallback): ChildProcess;
|
|
1760
|
+
export function execFile(file: string, args: string[] | null, options: ExecSyncOptions, callback: ExecFileCallback): ChildProcess;
|
|
1618
1761
|
export function execFile(
|
|
1619
1762
|
file: string,
|
|
1620
1763
|
args?: string[] | null,
|
|
@@ -1633,13 +1776,14 @@ declare module "node:child_process" {
|
|
|
1633
1776
|
export * from "child_process";
|
|
1634
1777
|
}
|
|
1635
1778
|
|
|
1636
|
-
/* node:util —
|
|
1637
|
-
*
|
|
1638
|
-
*
|
|
1639
|
-
*
|
|
1640
|
-
* Command-failed / spawn-ENOENT errors otherwise. Other promisify
|
|
1641
|
-
* targets and bare promisify values fence per site. */
|
|
1779
|
+
/* node:util — compile-time projections for child_process.execFile and
|
|
1780
|
+
* fs.readFile. The former retains Node's custom { stdout, stderr } result;
|
|
1781
|
+
* the latter resolves the callback's data argument. Other targets and bare
|
|
1782
|
+
* promisify values fence per site. */
|
|
1642
1783
|
declare module "util" {
|
|
1784
|
+
export function promisify(
|
|
1785
|
+
fn: typeof import("node:fs").readFile,
|
|
1786
|
+
): (path: string, encoding: "utf8" | "utf-8") => Promise<string>;
|
|
1643
1787
|
export function promisify(
|
|
1644
1788
|
fn: (file: string, args?: string[] | null, options?: object) => unknown,
|
|
1645
1789
|
): (
|
|
@@ -1736,9 +1880,10 @@ declare module "node:util/types" {
|
|
|
1736
1880
|
* Object.is over scalars; deepStrictEqual compares composites
|
|
1737
1881
|
* structurally per their static types. The messages here are plain
|
|
1738
1882
|
* strings (Node accepts Errors — that form fences per site), and the
|
|
1739
|
-
*
|
|
1740
|
-
*
|
|
1741
|
-
*
|
|
1883
|
+
* shallow legacy pair (equal/notEqual) follows Node's == coercions for
|
|
1884
|
+
* primitive and primitive-union operands, including Node v24's NaN
|
|
1885
|
+
* exception. deepEqual/notDeepEqual remain declared-but-fenced;
|
|
1886
|
+
* assert/strict's loose names alias the strict forms and lower. */
|
|
1742
1887
|
/* node:test — the in-process test runner (prefix-only in Node too:
|
|
1743
1888
|
* require("test") is MODULE_NOT_FOUND). test/it register tests (sync and
|
|
1744
1889
|
* async bodies, skip/todo/only options and method twins), describe/suite
|
|
@@ -1978,14 +2123,38 @@ declare module "node:readline" {
|
|
|
1978
2123
|
export * from "readline";
|
|
1979
2124
|
}
|
|
1980
2125
|
|
|
1981
|
-
/* node:zlib —
|
|
1982
|
-
* Node's default options; libz links only into zlib-using
|
|
1983
|
-
*
|
|
2126
|
+
/* node:zlib — the one-shot zlib/raw/gzip codecs lower for string/Buffer
|
|
2127
|
+
* inputs with Node's default options; libz links only into zlib-using
|
|
2128
|
+
* binaries. Callback forms use the executable worker pool. Options stay
|
|
2129
|
+
* declared so reached uses receive a named SC2020 refusal; Brotli,
|
|
2130
|
+
* streaming, and Zstd remain outside the lowered surface. */
|
|
1984
2131
|
declare module "zlib" {
|
|
1985
|
-
export
|
|
1986
|
-
export
|
|
1987
|
-
export function
|
|
1988
|
-
export function
|
|
2132
|
+
export interface ZlibOptions { [option: string]: unknown }
|
|
2133
|
+
export type ZlibCallback = (error: NodeJS.ErrnoException | null, result: Buffer) => void;
|
|
2134
|
+
export function deflate(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2135
|
+
export function deflate(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2136
|
+
export function deflateSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2137
|
+
export function inflate(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2138
|
+
export function inflate(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2139
|
+
export function inflateSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2140
|
+
export function deflateRaw(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2141
|
+
export function deflateRaw(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2142
|
+
export function deflateRawSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2143
|
+
export function inflateRaw(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2144
|
+
export function inflateRaw(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2145
|
+
export function inflateRawSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2146
|
+
export function gzip(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2147
|
+
export function gzip(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2148
|
+
export function gzipSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2149
|
+
export function gunzip(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2150
|
+
export function gunzip(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2151
|
+
export function gunzipSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2152
|
+
export function unzip(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2153
|
+
export function unzip(data: string | Uint8Array, options: ZlibOptions, callback: ZlibCallback): void;
|
|
2154
|
+
export function unzipSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2155
|
+
export function crc32(data: string | Uint8Array, value?: number): number;
|
|
2156
|
+
export function brotliCompressSync(data: string | Uint8Array): Buffer;
|
|
2157
|
+
export function brotliDecompressSync(data: Uint8Array): Buffer;
|
|
1989
2158
|
}
|
|
1990
2159
|
declare module "node:zlib" {
|
|
1991
2160
|
export * from "zlib";
|
|
@@ -2191,7 +2360,11 @@ declare module "http" {
|
|
|
2191
2360
|
readonly statusMessage: string | undefined;
|
|
2192
2361
|
readonly socket: Socket;
|
|
2193
2362
|
readonly headers: { [name: string]: string | undefined };
|
|
2363
|
+
readonly headersDistinct: { [name: string]: string[] | undefined };
|
|
2194
2364
|
readonly rawHeaders: string[];
|
|
2365
|
+
readonly trailers: { [name: string]: string | undefined };
|
|
2366
|
+
readonly trailersDistinct: { [name: string]: string[] | undefined };
|
|
2367
|
+
readonly rawTrailers: string[];
|
|
2195
2368
|
resume(): void;
|
|
2196
2369
|
destroy(): void;
|
|
2197
2370
|
/* setEncoding('utf8'): 'data' delivers strings (other real encodings
|
|
@@ -2213,6 +2386,7 @@ declare module "http" {
|
|
|
2213
2386
|
}
|
|
2214
2387
|
export interface ServerResponse {
|
|
2215
2388
|
readonly headersSent: boolean;
|
|
2389
|
+
readonly writableCorked: number;
|
|
2216
2390
|
/* Node's writable head properties: the implicit head reads them. */
|
|
2217
2391
|
statusCode: number;
|
|
2218
2392
|
statusMessage: string;
|
|
@@ -2225,6 +2399,10 @@ declare module "http" {
|
|
|
2225
2399
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders | string[]): ServerResponse;
|
|
2226
2400
|
writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders | string[]): ServerResponse;
|
|
2227
2401
|
write(data: string | Uint8Array): void;
|
|
2402
|
+
flushHeaders(): void;
|
|
2403
|
+
cork(): void;
|
|
2404
|
+
uncork(): void;
|
|
2405
|
+
addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
|
|
2228
2406
|
/* end's callback forms fire once the body went out (the 'finish'
|
|
2229
2407
|
* emit, deferred past the handler's synchronous tail). */
|
|
2230
2408
|
end(data?: string | Uint8Array, callback?: () => void): void;
|
|
@@ -2300,6 +2478,11 @@ declare module "http" {
|
|
|
2300
2478
|
export const globalAgent: Agent;
|
|
2301
2479
|
export interface ClientRequest {
|
|
2302
2480
|
readonly destroyed: boolean;
|
|
2481
|
+
readonly writableCorked: number;
|
|
2482
|
+
flushHeaders(): void;
|
|
2483
|
+
addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
|
|
2484
|
+
cork(): void;
|
|
2485
|
+
uncork(): void;
|
|
2303
2486
|
write(data: string | Uint8Array): void;
|
|
2304
2487
|
end(data?: string | Uint8Array): void;
|
|
2305
2488
|
destroy(): void;
|
|
@@ -2517,6 +2700,7 @@ declare module "http2" {
|
|
|
2517
2700
|
}
|
|
2518
2701
|
export interface Http2ServerResponse {
|
|
2519
2702
|
readonly headersSent: boolean;
|
|
2703
|
+
readonly writableCorked: number;
|
|
2520
2704
|
/* The same lowered surface as http.ServerResponse — the allowHTTP1
|
|
2521
2705
|
* lowering serves every connection as HTTP/1.1, where the compat
|
|
2522
2706
|
* response IS this parser's response handle. */
|
|
@@ -2529,6 +2713,10 @@ declare module "http2" {
|
|
|
2529
2713
|
writeHead(statusCode: number, headers?: import("http").OutgoingHttpHeaders | string[]): Http2ServerResponse;
|
|
2530
2714
|
writeHead(statusCode: number, statusMessage: string, headers?: import("http").OutgoingHttpHeaders | string[]): Http2ServerResponse;
|
|
2531
2715
|
write(data: string | Uint8Array): void;
|
|
2716
|
+
flushHeaders(): void;
|
|
2717
|
+
cork(): void;
|
|
2718
|
+
uncork(): void;
|
|
2719
|
+
addTrailers(headers: import("http").OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
|
|
2532
2720
|
end(data?: string | Uint8Array, callback?: () => void): void;
|
|
2533
2721
|
end(callback: () => void): void;
|
|
2534
2722
|
destroy(): void;
|
|
@@ -3117,8 +3305,14 @@ declare module "node:cluster" {
|
|
|
3117
3305
|
export = cluster;
|
|
3118
3306
|
}
|
|
3119
3307
|
|
|
3120
|
-
/* node:tty — the fd probe (the same isatty(3) behind process.*.isTTY)
|
|
3308
|
+
/* node:tty — the fd probe (the same isatty(3) behind process.*.isTTY)
|
|
3309
|
+
* and the supported structural view of a process output stream. */
|
|
3121
3310
|
declare module "tty" {
|
|
3311
|
+
export interface WriteStream {
|
|
3312
|
+
write(data: string | Uint8Array, callback?: (error?: Error | null) => void): boolean;
|
|
3313
|
+
write(data: string | Uint8Array, encoding: BufferEncoding, callback?: (error?: Error | null) => void): boolean;
|
|
3314
|
+
readonly isTTY: boolean;
|
|
3315
|
+
}
|
|
3122
3316
|
export function isatty(fd: number): boolean;
|
|
3123
3317
|
}
|
|
3124
3318
|
declare module "node:tty" {
|
|
@@ -59,6 +59,15 @@ export declare function dnsLookupThunkFor(emitter: CEmitter, cbT: IrType): strin
|
|
|
59
59
|
* ScrError (or NULL); the adapter builds the callback's program-specific
|
|
60
60
|
* Error | null union, or a dyn error/null for checkJs callbacks. */
|
|
61
61
|
export declare function fsRenameThunkFor(emitter: CEmitter, cbT: IrType): string;
|
|
62
|
+
/** Callback adapter for randomBytes/pbkdf2. The runtime transfers one
|
|
63
|
+
* owned Buffer; the adapter materializes the callback's Error | null (or
|
|
64
|
+
* checked-dynamic null) first argument and either transfers or boxes the
|
|
65
|
+
* Buffer according to the program-specific callback signature. */
|
|
66
|
+
export declare function cryptoBytesThunkFor(emitter: CEmitter, cbT: IrType): string;
|
|
67
|
+
/** Error-first Buffer callback adapter for worker-backed zlib operations.
|
|
68
|
+
* The runtime transfers the success Buffer and borrows the failure Error;
|
|
69
|
+
* exactly one is non-NULL. */
|
|
70
|
+
export declare function zlibBytesThunkFor(emitter: CEmitter, cbT: IrType): string;
|
|
62
71
|
/** Interned CONNECT-listener adapter for a UNION socket slot — the h2
|
|
63
72
|
* compat listener (`(req, resOrSocket: Http2ServerResponse | net.Socket)
|
|
64
73
|
* => void`): the runtime fires (cb, req, sock, head) like an upgrade;
|
|
@@ -117,6 +126,27 @@ export declare function resolveThunkFor(emitter: CEmitter, inner: IrType): strin
|
|
|
117
126
|
* (the callee owns +1 per the universal convention; f64/bool copy), and
|
|
118
127
|
* calls cb->fn behind its exact C signature. Interned per func-type key. */
|
|
119
128
|
export declare function emitterInvokeThunkFor(emitter: CEmitter, cbT: IrType): string;
|
|
129
|
+
/** child_process.execFile's error-first callback adapter. The runtime owns
|
|
130
|
+
* one +1 callback plus +1 error/output values at settlement; the adapter
|
|
131
|
+
* wraps the nullable error with this program's union tags, transfers every
|
|
132
|
+
* declared argument into the compiled closure, and releases ignored suffix
|
|
133
|
+
* values for callbacks that declare fewer than three parameters. */
|
|
134
|
+
export declare function execFileThunkFor(emitter: CEmitter, cbT: IrType & {
|
|
135
|
+
kind: "func";
|
|
136
|
+
}): string;
|
|
137
|
+
/** Fork IPC message adapter: parse results arrive as a borrowed dyn tree,
|
|
138
|
+
* then validate into the listener's static JSON shape. Async listener
|
|
139
|
+
* promises are deliberately released without attaching a handler, matching
|
|
140
|
+
* EventEmitter's ignored return value. */
|
|
141
|
+
export declare function ipcMessageThunkFor(emitter: CEmitter, cbT: IrType & {
|
|
142
|
+
kind: "func";
|
|
143
|
+
}): string;
|
|
144
|
+
/** Fork IPC send completion adapter. The nullable +1 runtime Error moves
|
|
145
|
+
* into the callback's Error|null union, or is released for a zero-argument
|
|
146
|
+
* callback. */
|
|
147
|
+
export declare function ipcSendThunkFor(emitter: CEmitter, cbT: IrType & {
|
|
148
|
+
kind: "func";
|
|
149
|
+
}): string;
|
|
120
150
|
/** The stream-'data' listener invoke adapter for one listener func type:
|
|
121
151
|
* the runtime's 'data' emission carries BOTH payload slots (ScrBytes *b,
|
|
122
152
|
* ScrStr *s — exactly one non-NULL; encoded streams deliver strings),
|