@tsonic/nodejs 10.0.40 → 10.0.42

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.
@@ -0,0 +1,205 @@
1
+ // Generated by tsbindgen - Architecture
2
+ // Namespace: nodejs.Http
3
+ // Assembly: nodejs
4
+
5
+ // Primitive type aliases from @tsonic/core
6
+ import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/core/types.js';
7
+
8
+ // Import types from other namespaces
9
+ import * as nodejs_Internal from "../../index/internal/index.js";
10
+ import type { Buffer, EventEmitter } from "../../index/internal/index.js";
11
+ import type { Dictionary_2 } from "@tsonic/dotnet/System.Collections.Generic/internal/index.js";
12
+ import * as System_Runtime_Serialization_Internal from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
13
+ import type { ISerializable } from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
14
+ import type { Task, Task_1 } from "@tsonic/dotnet/System.Threading.Tasks/internal/index.js";
15
+ import * as System_Internal from "@tsonic/dotnet/System/internal/index.js";
16
+ import type { Action, Action_1, Action_2, Boolean as ClrBoolean, Byte, Delegate, Double, Exception, Int32, Nullable_1, Object as ClrObject, String as ClrString, Void } from "@tsonic/dotnet/System/internal/index.js";
17
+
18
+ export interface AddressInfo$instance {
19
+ readonly __tsonic_type_nodejs_Http_AddressInfo: never;
20
+
21
+ address: string;
22
+ family: string;
23
+ port: int;
24
+ }
25
+
26
+
27
+ export const AddressInfo: {
28
+ new(): AddressInfo;
29
+ };
30
+
31
+
32
+ export type AddressInfo = AddressInfo$instance;
33
+
34
+ export interface ClientRequest$instance extends EventEmitter {
35
+ readonly __tsonic_type_nodejs_Http_ClientRequest: never;
36
+
37
+ readonly aborted: boolean;
38
+ readonly host: string;
39
+ readonly method: string;
40
+ readonly path: string;
41
+ readonly protocol: string;
42
+ abort(): void;
43
+ end(chunk?: string, encoding?: string, callback?: Action): Task;
44
+ getHeader(name: string): string | undefined;
45
+ getHeaderNames(): string[];
46
+ removeHeader(name: string): void;
47
+ setHeader(name: string, value: string): void;
48
+ setTimeout(msecs: int, callback?: Action): ClientRequest;
49
+ write(chunk: string, encoding?: string, callback?: Action): boolean;
50
+ }
51
+
52
+
53
+ export const ClientRequest: {
54
+ };
55
+
56
+
57
+ export type ClientRequest = ClientRequest$instance;
58
+
59
+ export interface IncomingMessage$instance extends EventEmitter {
60
+ readonly __tsonic_type_nodejs_Http_IncomingMessage: never;
61
+
62
+ complete: boolean;
63
+ readonly headers: Dictionary_2<System_Internal.String, System_Internal.String>;
64
+ readonly httpVersion: string;
65
+ readonly method: string | undefined;
66
+ readonly statusCode: Nullable_1<System_Internal.Double>;
67
+ readonly statusMessage: string | undefined;
68
+ readonly url: string | undefined;
69
+ destroy(): void;
70
+ onClose(callback: Action): void;
71
+ onData(callback: Action_1<System_Internal.String>): void;
72
+ onEnd(callback: Action): void;
73
+ readAll(): Task_1<System_Internal.String>;
74
+ setTimeout(msecs: double, callback?: Action): IncomingMessage;
75
+ }
76
+
77
+
78
+ export const IncomingMessage: {
79
+ };
80
+
81
+
82
+ export type IncomingMessage = IncomingMessage$instance;
83
+
84
+ export interface RequestOptions$instance {
85
+ readonly __tsonic_type_nodejs_Http_RequestOptions: never;
86
+
87
+ get agent(): unknown | undefined;
88
+ set agent(value: unknown | undefined);
89
+ get auth(): string | undefined;
90
+ set auth(value: string | undefined);
91
+ get headers(): Dictionary_2<System_Internal.String, System_Internal.String> | undefined;
92
+ set headers(value: Dictionary_2<System_Internal.String, System_Internal.String> | undefined);
93
+ get host(): string | undefined;
94
+ set host(value: string | undefined);
95
+ get hostname(): string | undefined;
96
+ set hostname(value: string | undefined);
97
+ method: string;
98
+ get path(): string | undefined;
99
+ set path(value: string | undefined);
100
+ port: int;
101
+ protocol: string;
102
+ get timeout(): Nullable_1<System_Internal.Int32>;
103
+ set timeout(value: Nullable_1<System_Internal.Int32> | int);
104
+ }
105
+
106
+
107
+ export const RequestOptions: {
108
+ new(): RequestOptions;
109
+ };
110
+
111
+
112
+ export type RequestOptions = RequestOptions$instance;
113
+
114
+ export interface Server$instance extends EventEmitter {
115
+ readonly __tsonic_type_nodejs_Http_Server: never;
116
+
117
+ headersTimeout: double;
118
+ keepAliveTimeout: double;
119
+ readonly listening: boolean;
120
+ maxHeadersCount: int;
121
+ requestTimeout: double;
122
+ timeout: double;
123
+ address(): AddressInfo | undefined;
124
+ close(callback?: Action): Server;
125
+ listen(port: double, hostname?: string, backlog?: Nullable_1<System_Internal.Double>, callback?: Action): Server;
126
+ listen(port: double, callback: Action): Server;
127
+ listen(port: double, hostname: string, callback: Action): Server;
128
+ setTimeout(msecs: double, callback?: Action): Server;
129
+ }
130
+
131
+
132
+ export const Server: {
133
+ new(requestListener: Action_2<IncomingMessage, ServerResponse>): Server;
134
+ };
135
+
136
+
137
+ export type Server = Server$instance;
138
+
139
+ export interface ServerResponse$instance extends EventEmitter {
140
+ readonly __tsonic_type_nodejs_Http_ServerResponse: never;
141
+
142
+ readonly finished: boolean;
143
+ readonly headersSent: boolean;
144
+ statusCode: double;
145
+ statusMessage: string;
146
+ end(): ServerResponse;
147
+ end(callback: Action): ServerResponse;
148
+ end(chunk: string, encoding?: string, callback?: Action): ServerResponse;
149
+ end(chunk: Buffer, callback?: Action): ServerResponse;
150
+ end(chunk: byte[], callback?: Action): ServerResponse;
151
+ flushHeaders(): void;
152
+ getHeader(name: string): string | undefined;
153
+ getHeaderNames(): string[];
154
+ getHeaders(): Dictionary_2<System_Internal.String, System_Internal.String>;
155
+ hasHeader(name: string): boolean;
156
+ removeHeader(name: string): void;
157
+ setHeader(name: string, value: string): ServerResponse;
158
+ setTimeout(msecs: double, callback?: Action): ServerResponse;
159
+ write(chunk: string, encoding?: string, callback?: Action): boolean;
160
+ write(chunk: Buffer, callback?: Action): boolean;
161
+ write(chunk: byte[], callback?: Action): boolean;
162
+ writeHead(statusCode: double, statusMessage?: string, headers?: Dictionary_2<System_Internal.String, System_Internal.String>): ServerResponse;
163
+ writeHead(statusCode: double, headers: Dictionary_2<System_Internal.String, System_Internal.String>): ServerResponse;
164
+ }
165
+
166
+
167
+ export const ServerResponse: {
168
+ };
169
+
170
+
171
+ export type ServerResponse = ServerResponse$instance;
172
+
173
+ export interface TypeError$instance extends Exception {
174
+ readonly __tsonic_type_nodejs_Http_TypeError: never;
175
+
176
+ readonly __tsonic_iface_System_Runtime_Serialization_ISerializable: never;
177
+
178
+ }
179
+
180
+
181
+ export const TypeError: {
182
+ new(message: string): TypeError;
183
+ };
184
+
185
+
186
+ export type TypeError = TypeError$instance;
187
+
188
+ export abstract class http$instance {
189
+ static get globalAgent_maxSockets(): Nullable_1<System_Internal.Int32>;
190
+ static set globalAgent_maxSockets(value: Nullable_1<System_Internal.Int32> | int);
191
+ static globalAgent_maxFreeSockets: int;
192
+ static globalAgent_timeout: int;
193
+ static maxHeaderSize: int;
194
+ static createServer(requestListener?: Action_2<IncomingMessage, ServerResponse>): Server;
195
+ static get(options: RequestOptions, callback?: Action_1<IncomingMessage>): ClientRequest;
196
+ static get(url: string, callback?: Action_1<IncomingMessage>): ClientRequest;
197
+ static request(options: RequestOptions, callback?: Action_1<IncomingMessage>): ClientRequest;
198
+ static request(url: string, callback?: Action_1<IncomingMessage>): ClientRequest;
199
+ static validateHeaderName(name: string): void;
200
+ static validateHeaderValue(name: string, value: unknown): void;
201
+ }
202
+
203
+
204
+ export type http = http$instance;
205
+
package/nodejs.Http.d.ts CHANGED
@@ -6,9 +6,9 @@
6
6
  import * as Internal from './nodejs.Http/internal/index.js';
7
7
 
8
8
  // Cross-namespace type imports for constraints
9
- import type { EventEmitter } from './index/internal/index.js';
9
+ import type { Buffer, EventEmitter } from './index/internal/index.js';
10
10
  import type { Dictionary } from '@tsonic/dotnet/System.Collections.Generic.js';
11
- import type { Action, Boolean as ClrBoolean, Delegate, Exception, Int32, Nullable, Object as ClrObject, String as ClrString, Void } from '@tsonic/dotnet/System.js';
11
+ import type { Action, Boolean as ClrBoolean, Byte, Delegate, Double, Exception, Int32, Nullable, Object as ClrObject, String as ClrString, Void } from '@tsonic/dotnet/System.js';
12
12
  import type { ISerializable } from '@tsonic/dotnet/System.Runtime.Serialization.js';
13
13
  import type { Task } from '@tsonic/dotnet/System.Threading.Tasks.js';
14
14
 
package/package.json CHANGED
@@ -1,19 +1,15 @@
1
1
  {
2
2
  "name": "@tsonic/nodejs",
3
- "version": "10.0.40",
3
+ "version": "10.0.42",
4
4
  "description": "TypeScript type definitions for Node.js CLR library",
5
5
  "main": "index.d.ts",
6
6
  "types": "index.d.ts",
7
7
  "files": [
8
- "index.d.ts",
9
- "index.js",
10
- "node-aliases.d.ts",
11
- "nodejs.Http.d.ts",
12
- "nodejs.Http.js",
13
- "bindings.json",
8
+ "**/*.d.ts",
9
+ "**/*.js",
10
+ "**/bindings.json",
14
11
  "families.json",
15
12
  "tsonic.bindings.json",
16
- "tsonic.surface.json",
17
13
  "README.md",
18
14
  "LICENSE"
19
15
  ],
@@ -34,8 +30,8 @@
34
30
  "url": "https://github.com/tsoniclang/nodejs.git"
35
31
  },
36
32
  "dependencies": {
37
- "@tsonic/js": "10.0.40",
38
- "@tsonic/dotnet": "10.0.37",
39
- "@tsonic/core": "10.0.37"
33
+ "@tsonic/dotnet": "10.0.38",
34
+ "@tsonic/core": "10.0.38",
35
+ "@tsonic/js": "10.0.42"
40
36
  }
41
37
  }
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "bindingVersion": 1,
3
3
  "packageName": "@tsonic/nodejs",
4
- "surfaceMode": "@tsonic/nodejs",
4
+ "assemblyName": "nodejs",
5
+ "requiredTypeRoots": [
6
+ "."
7
+ ],
5
8
  "runtimePackages": [
6
9
  "@tsonic/nodejs"
7
10
  ],
@@ -15,7 +18,7 @@
15
18
  "packageReferences": [
16
19
  {
17
20
  "id": "Tsonic.Nodejs",
18
- "version": "1.0.1",
21
+ "version": "1.0.3",
19
22
  "types": "@tsonic/nodejs"
20
23
  }
21
24
  ]
@@ -1,11 +0,0 @@
1
- {
2
- "schemaVersion": 1,
3
- "id": "@tsonic/nodejs",
4
- "extends": [
5
- "@tsonic/js"
6
- ],
7
- "requiredTypeRoots": [
8
- "."
9
- ],
10
- "useStandardLib": false
11
- }